Sampling a model run before a full build
The --sample flag puts a dbt invocation into 'sample mode,' filtering input data to a limited, relative time window so developers can build or test models faster during local development and CI without processing full production volumes. It uses each model's configured event_time (the same field used for microbatch incremental models) to determine which rows to include.
Must-know
- Sample mode filters rows based on the model's (and its sources'/seeds') configured
event_timecolumn; models withoutevent_timeset are not sampled and run against their full dataset. - You invoke it as part of a normal invocation, e.g.
dbt run --sample=<relative_time_range>ordbt build --sample=<relative_time_range>, restricting data to that recent window relative to the current run time. - Sample mode is meant for development and CI workflows to speed up iteration, not for production runs, since it intentionally works on incomplete data.
- Because upstream data is truncated, downstream tests (row counts, uniqueness, referential integrity, etc.) can behave differently or fail compared to running against full data.
- Sample mode combines with normal node selection (
--select/--exclude), so you can scope both which models run and how much data each processes for fast local cycles. - It only affects what data is read/processed during that invocation—it does not modify or truncate your actual source tables or persist any sampling logic into the model's compiled SQL.
What is the primary purpose of running dbt build with the --sample flag?
What you have tried across dbt Analytics Engineering's objectives, not a readiness score.
Developing and optimizing dbt models
- Tracing and confirming a model's upstream raw sources
- How dbt's core materialization types differ
- Keeping models modular and avoiding repeated logic
- What each core dbt command actually does
- Shaping a model's dependency graph so it stays readable
- Setting project-wide configuration in dbt_project.yml
- Pulling in and using a dbt package
- Writing a model in Python instead of SQL
- Granting model access through the grants config
- Configuring a snapshot to track slowly changing data
- Picking the right incremental strategy for a dataset
- Dry-running a model to check its logic and schema before a real build
- Sampling a model run before a full build
- What microbatch and other advanced materializations are for
Managing dbt models governance
Debugging data modeling errors
Troubleshooting and optimizing dbt pipelines
Implementing dbt tests
Implementing and maintaining external dependencies
Coverage checked against the published exam guide on Aug 5, 2026.
These are independent practice questions, written against this certification's published exam guide. They are not the certification vendor's own questions, and not the real exam.