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

The --empty flag #4966

merged 5 commits into from
Feb 26, 2024

Conversation

matthewshaver
Copy link
Contributor

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:

@matthewshaver matthewshaver requested a review from a team as a code owner February 21, 2024 15:44
Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 4:27pm

@github-actions github-actions bot added content Improvements or additions to content size: small This change will take 1 to 2 days to address Docs team Authored by the Docs team @dbt Labs labels Feb 21, 2024

### 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."

Copy link
Contributor

@mirnawong1 mirnawong1 left a comment

Choose a reason for hiding this comment

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

lgtm and since it's approved already, only non blocker that i think will be helpful for users is adding a 'why is this useful or important in the 'build' and 'run' pages:

This validates dependencies and ensures your models will build properly. Using the --empty flag enhances performance and helps with warehouse costs (not sure if that's right?)

@matthewshaver matthewshaver merged commit d05466d into current Feb 26, 2024
7 checks passed
@matthewshaver matthewshaver deleted the empty branch February 26, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content Docs team Authored by the Docs team @dbt Labs February-2024 size: small This change will take 1 to 2 days to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support --empty flag for schema-only dry runs from dbt-core PR #8971
4 participants