Development Data Location? #565
Replies: 1 comment 1 reply
-
(Moving this to the Discussion board :) ) Hey @James-G-Hill, Thanks for your question. This is indeed something that can be cumbersome while developing. I indeed would suggest using a local extraction of the db so that you don't have to do the query all the time. Here are some strategies I have adopted in the past:
Whatever the approach, I then add a "local" argument to my Then on top of my server function, I do: if (golem::get_golem_option("local")){
dataset <- read.csv(app_sys("dataset.csv"))
} else {
dataset <- do_the_external_sql_query()
} Does that make sense to you? Cheers, Colin |
Beta Was this translation helpful? Give feedback.
-
Hello, this is more a query rather than bug or request. Many applications depend upon data that's downloaded from an external source such as an SQL database or AirTable. During development of such applications the download time for the dataset can be long enough to feel like an interruption in the workflow. It therefore sometimes seems best to include a simple dataset for development purposes that can be loaded quickly in from disk. In this case, where is the best place to store such data; would you recommend to put it in a sub-directory of the /dev directory & then load in within the 'run_dev.R' file?
Beta Was this translation helpful? Give feedback.
All reactions