dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.75k stars 1.62k forks source link

[Feature] Support `--empty` flag for snapshots #10372

Open d-cole opened 3 months ago

d-cole commented 3 months ago

Is this your first time submitting a feature request?

Describe the feature

Support the empty flag for snapshots. Currently, dbt snapshot --empty results in the error: "Error: No such option: --empty Did you mean --help?". This means unit tests for models downstream of snapshots cannot run with the usual workflow.

Describe alternatives you've considered

Running upstreams of snapshots with --empty then running the snapshots. This makes configuring unit tests in CI much more complex as you need the additional steps:

Who will this benefit?

Users of unit tests and snapshots

Are you interested in contributing this feature?

No response

Anything else?

No response

dbeatty10 commented 2 months ago

Thanks for opening this @d-cole !

We've got something similar open for seeds as well: https://github.com/dbt-labs/dbt-core/issues/8981

We've added your issue for snapshots to https://github.com/dbt-labs/dbt-core/issues/10151.

d-cole commented 2 months ago

Great, thank you @dbeatty10!