Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --empty flag #4966

Merged
merged 5 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/run#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 build the project and models, parse the files to identify changes, but won't actually execute the SQL against the target data warehouse. This ensures your models will build properly and validates dependencies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbt will build the project and models, parse the files to identify changes, but won't actually execute the SQL against the target data warehouse.

I don't think this is technically correct. Perhaps:
"dbt will still execute the model SQL against the target data warehouse, but will avoid expensive reads of input data. This ensures your models will build properly and validates dependencies."

matthewshaver marked this conversation as resolved.
Show resolved Hide resolved


## 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 build the project and models, parse the files to identify changes, but won't actually execute the SQL against the target data warehouse. This ensures your models will build properly and validates dependencies.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

</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 build the project and models, parse the files to identify changes, but won't actually execute the SQL against the target data warehouse. This ensures your models will build properly and validates dependencies.
matthewshaver marked this conversation as resolved.
Show resolved Hide resolved

</VersionBlock>
Loading