Create a dataset
A dataset is one saved SQL query whose result is cached and shared. You write the query once; every card built on top reads the same cached rows instead of hitting your warehouse again. Creating datasets requires the Builder tier (T4) or above.
What a dataset holds
- The SQL -- any query your connected source accepts.
- A cached result -- the rows from the last run, shared by every card bound to the dataset.
- A cache TTL -- how long the cached result stays fresh, in seconds (default 300, i.e. five minutes). While fresh, nobody pays for another warehouse run.
- A row limit -- the most rows a run may return (default 50,000, configurable up to 200,000). A query that hits the limit fails with a prompt to aggregate further in SQL or raise the limit.
Dataset SQL can also declare parameters with {name} placeholders, which
dashboard filters fill in at view time -- see
Datasets and SQL for the full picture.
Creating one
- Open Build → Datasets and start a new dataset.
- Give it a name your builders will recognise, and optionally a description.
- Write the SQL. The editor starts from a sample query you can replace.
- Select Run to preview the result below the editor. Preview runs are ad hoc: they show you the rows but do not write the shared cache.
- Adjust the TTL and row limit if the defaults don't suit, then Save.
The editor keeps a local draft as you type, so navigating away and back doesn't lose work.
How the cache behaves
The first time a card asks for the dataset's data, Flynt runs the SQL and caches the result. Until the TTL expires, every card and every person viewing those cards reads the cache. After it expires, the next builder request triggers a fresh run.
Viewers are special: someone who can only view dashboards never triggers a warehouse run. They are always served the cached result, even if it is past its TTL -- stale data beats a surprise query bill.
You can also force a refresh at any time by running the dataset from its editor.
Good to know
- Datasets normally query BigQuery, but they can also query data ingested from Google Sheets -- see Google Sheets and files.
- Editing a dataset's SQL clears its cache, so cards pick up the new shape on their next fetch.
- A dataset that cards depend on cannot be deleted until those cards are deleted first.
Next: build a card and dashboard on top of it.