Skip to content

sending arguments into data loaders using an interactive user-driven rig #1743

Answered by mythmon
drewda asked this question in Q&A
Discussion options

You must be logged in to vote

That's a very interesting idea! I'd probably approach this by setting environment variables when running the Framework build command. Those environment variables could then be read in the data loaders.

Alternatively, the observablehq.config.js file is code, and is free to run arbitrary code. It could read the user input from some input (maybe environment variables, maybe a file, maybe something else?). Then it could construct dynamicPaths in such a way to trigger the parameterized data loaders feature from #245.

I'm curious to hear about what you build with this!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drewda
Comment options

Answer selected by drewda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants