Skip to content

Dynamically loading data based on user input from a relatively large live db (5mil+ rows) #1974

Answered by csdiehl16
avindhyac asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Avindhya - the data loaders run at build time, so it's not possible to pass back user input you get at run time. This is so that dashboards load quickly by not running a new query in response to user input. The way you have it set up with parameterized routes, a user selecting a country and year should take them to a new page, which loads the static file that has already been produced by the data loader at build time.

If you're creating a single-page application, you might want to look into creating a duckDB database client, which would allow you to run SQL queries based on user input: https://observablehq.com/framework/lib/duckdb

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@avindhyac
Comment options

@Fil
Comment options

Fil Apr 23, 2025
Collaborator

@avindhyac
Comment options

@csdiehl16
Comment options

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