diff --git a/website/docs/reference/node-selection/syntax.md b/website/docs/reference/node-selection/syntax.md index a46c4145217..c61ab598a88 100644 --- a/website/docs/reference/node-selection/syntax.md +++ b/website/docs/reference/node-selection/syntax.md @@ -193,36 +193,19 @@ The state and result selectors can also be combined in a single invocation of db dbt run --select "result:+" state:modified+ --defer --state ./ ``` -### Fresh rebuilds - -Only supported by v1.1 or newer. - -When a job is selected, dbt Cloud will surface the artifacts from that job's most recent successful run. dbt will then use those artifacts to determine the set of fresh sources. In your job commands, you can signal to dbt to run and test only on these fresher sources and their children by including the `source_status:fresher+` argument. This requires both previous and current state to have the `sources.json` artifact be available. Or plainly said, both job states need to run `dbt source freshness`. - -As example: - -```bash -# Command step order -dbt source freshness -dbt build --select "source_status:fresher+" -``` - - -For more example commands, refer to [Pro-tips for workflows](/best-practices/best-practice-workflows#pro-tips-for-workflows). - ### The "source_status" status -Only supported by v1.1 or newer. - Another element of job state is the `source_status` of a prior dbt invocation. After executing `dbt source freshness`, for example, dbt creates the `sources.json` artifact which contains execution times and `max_loaded_at` dates for dbt sources. You can read more about `sources.json` on the ['sources'](/reference/artifacts/sources-json) page. -The following dbt commands produce `sources.json` artifacts whose results can be referenced in subsequent dbt invocations: -- `dbt source freshness` +The `dbt source freshness` command produces a `sources.json` artifact whose results can be referenced in subsequent dbt invocations. + +When a job is selected, dbt Cloud will surface the artifacts from that job's most recent successful run. dbt will then use those artifacts to determine the set of fresh sources. In your job commands, you can signal dbt to run and test only on the fresher sources and their children by including the `source_status:fresher+` argument. This requires both the previous and current states to have the `sources.json` artifact available. Or plainly said, both job states need to run `dbt source freshness`. -After issuing one of the above commands, you can reference the source freshness results by adding a selector to a subsequent command as follows: +After issuing the `dbt source freshness` command, you can reference the source freshness results by adding a selector to a subsequent command: ```bash # You can also set the DBT_ARTIFACT_STATE_PATH environment variable instead of the --state flag. dbt source freshness # must be run again to compare current to previous state dbt build --select "source_status:fresher+" --state path/to/prod/artifacts ``` +For more example commands, refer to [Pro-tips for workflows](/best-practices/best-practice-workflows#pro-tips-for-workflows).