Skip to content

Commit

Permalink
The --empty flag (#4966)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Updates the `run` and `build` command references to include the
`--empty` flag.

## Checklist

Uncomment when publishing docs for a prerelease version of dbt:
- [x] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [x] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)

- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [x] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
  • Loading branch information
matthewshaver authored Feb 26, 2024
2 parents 791a119 + e644caa commit d05466d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ dbt Labs is committed to providing backward compatibility for all versions 1.x,

## New and changed features and functionality

Coming soon!
Features and functionality new in dbt v1.8

### The `--empty` flag

The [`run`](/reference/commands/run#the-`--empty`-flag) and [`build`](/reference/commands/build#the---empty-flag) commands now support the `--empty` flag for building schema-only dry runs. The `--empty` flag limits the refs and sources to zero rows. dbt will still execute the model SQL against the target data warehouse but will avoid expensive reads of input data. This validates dependencies and ensures your models will build properly.


## Quick hits

Expand Down
8 changes: 8 additions & 0 deletions website/docs/reference/commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ In DAG order, for selected resources or an entire project.

**Flags:** The `build` task supports all the same flags as `run`, `test`, `snapshot`, and `seed`. For flags that are shared between multiple tasks (e.g. `--full-refresh`), `build` will use the same value for all selected resource types (e.g. both models and seeds will be full refreshed).

<VersionBlock firstVersion="1.8">

### The `--empty` flag

The `build` command supports the `--empty` flag for building schema-only dry runs. The `--empty` flag limits the refs and sources to zero rows. dbt will still execute the model SQL against the target data warehouse but will avoid expensive reads of input data. This validates dependencies and ensures your models will build properly.

</VersionBlock>

### Examples

```
Expand Down
8 changes: 8 additions & 0 deletions website/docs/reference/commands/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@ See [global configs](/reference/global-configs/failing-fast)
## Enable or Disable Colorized Logs

See [global configs](/reference/global-configs/print-output#print-color)

<VersionBlock firstVersion="1.8">

## The `--empty` flag

The `run` command supports the `--empty` flag for building schema-only dry runs. The `--empty` flag limits the refs and sources to zero rows. dbt will still execute the model SQL against the target data warehouse but will avoid expensive reads of input data. This validates dependencies and ensures your models will build properly.

</VersionBlock>

0 comments on commit d05466d

Please sign in to comment.