Build and Test Models with New Source Data
Last updated
Was this helpful?
Last updated
Was this helpful?
This template creates an optimized schedule that executes dbt™ models only when necessary by comparing manifests between runs. It reduces unnecessary model runs by building only models with code changes or fresher source data, making it ideal for resource optimization and efficient production deployments.
Key Benefits
Run only modified models that have changed since the last successful execution
Execute models with fresher source data, avoiding unnecessary processing of static data
Automatically retry failed models from previous runs for quick production recovery
Implementing the "Build and Test Models with New Source Data" schedule requires a multi-step setup process. Follow these instructions carefully to ensure a successful configuration.
Part 3: Create "Build and Test Models with New Source Data" from Template
Create the main Bolt schedule that will execute the dbt model builds and tests. It leverages the artifacts (manifests, run results, sources) generated in the previous prerequisite steps to enable the optimized model rebuilds.
From the Bolt home screen, select + New Schedule and then select the "Build and Test Models with New Source Data" template.
Schedule Type: Select Deferred, which enables manifest comparison between runs.
Name: Provide a relevant name (e.g. "Build and Test Models with New Source Data")
Description (Optional): Describe the purpose of this schedule (e.g. "Automatically build and test only models with fresher source data")
Last Run Type: Select Last Run to use the artifacts from the most recent execution.
Command Settings: Update the existing dbt commands:
Click "Deploy" to save the new schedule.
Part 4: Generate Initial Artifacts for "Build and Test Models with New Source Data" Schedule
Execute an initial run of the "Build and Test Models with New Source Data" schedule. This generates the necessary manifest files (artifacts) that will be used for state comparison.
From the Bolt home screen, click on the newly created "Build and Test Models with New Source Data" schedule.
Click "Run" to execute an initial run and generate the manifest files (artifacts).
Part 5: Transition to Self-Sustaining Schedule
Update the "Build and Test Models with New Source Data" schedule to be self-sustaining, allowing it to compare each subsequent run against its own previous successful execution. This makes the schedule more robust and efficient over time.
From the Bolt home screen, click on the "Build and Test Models with New Source Data" schedule.
Click "Edit" to modify the configuration.
Update the Deferred Schedule to "self" so the schedule can compare against its own previous successful run.
Command Settings: Reintroduce the full commands:
Click "Deploy" to save the changes.
This multi-step setup ensures the "Build and Test Models with New Source Data" schedule has the necessary artifacts and configuration to intelligently rebuild only the models with fresher source data or code changes, optimizing compute and improving deployment efficiency.
Deferred Schedule: Initially, select the existing "Source Freshness Check" schedule. This allows the first run to have manifest files (AKA ) to compare against.
(Optional): Configure success, failure, and SLA breach alerts via email, Slack, or MS Teams.
Verify the initial run was successful by checking the