Learn how to materialize queries
param
or runQuery
function calls.materialize
config tag to the query. This tag tells the Latitude server to store the query’s results in a file.
latitude materialize
to initiate the materialization process. Every query marked for materialization will be run, and the results will be stored in your Latitude server.
materialize
config will still run the query as usual. In order to use the materialized results, you must use the materialized
function, which is a special function that allows you to reference materialized data, only available in DuckDB
sources.
@latitude-data/duckdb-connector
package in order to create a new one.
queries
folder. To do so, create a new folder for this source and add a source.yml
with the following configuration:
details
section to your source.yml
file to provide additional information about your source. Read more about DuckDB sources for more information.
{materialized(...)}
function,
which takes the path to the materialized query as an argument, and lets you use the stored results as a regular SQL table.
Dockerfile
that will run the materialization process when the container is built.