Skip to main content
Version: 0.5.x

sqrl build

The build command builds the virtual data environment (with DuckDB) for your project. This command processes all static models (seeds, sources, and builds) and creates the necessary tables in a DuckDB database file.

Usage

sqrl build [options]

Options

OptionDescription
-f, --full-refreshDrop all tables before building
-s, --selectSelect one static model to build. If not specified, all models are built
--stageIf the production venv file is in use, stage the duckdb file to replace the production file later

Description

The build command:

  1. Processes all seed data files
  2. Connects to source databases and extracts sources (if its load_to_duckdb value is true)
  3. Executes build models to create static tables
  4. Stores all data in the DuckDB database

Examples

Build all models:

sqrl build

Build with full refresh:

sqrl build --full-refresh

Build a specific model:

sqrl build --select my_model

Stage a new build if the current one is in use:

sqrl build --stage

Notes

  • The build process creates a DuckDB database file in the target directory
  • Build models are executed in dependency order
  • The build process can be time-consuming for large datasets
  • The resulting DuckDB database may be used by dbview and federate models