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

[CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models for dbt build and run #8980

Closed
1 task done
Tracked by #8283
graciegoheen opened this issue Nov 1, 2023 · 3 comments · Fixed by #8971
Assignees
Labels
empty Issues related to the --empty CLI flag user docs [docs.getdbt.com] Needs better documentation

Comments

@graciegoheen
Copy link
Contributor

graciegoheen commented Nov 1, 2023

Housekeeping

  • I am a maintainer of dbt-core

Short description

introduce a new --empty flag, similar to this prototype for —sample to dbt run and dbt build

  • when enabled, build/run model with each input having a limit 0 where false added to it → no data scan to build an empty version of the model in the WH!
  • --empty works with --deferral for the dry-est of runs:
    - modified models are still built in dry-run mode (their refs use limit 0)
    - unmodified models are skipped?
    -similar to whats been proposed here: Schema-only dry-run feature - similar to a universal override of `materialize: view` or `LIMIT 0` #6989
  • additional considerations:
    - how does this work for seeds?

Acceptance criteria

see description

Impact to Other Teams

Will backports be required?

none

Context

No response

@graciegoheen graciegoheen added user docs [docs.getdbt.com] Needs better documentation Impact: Adapters labels Nov 1, 2023
@github-actions github-actions bot changed the title --empty flag to to provide a cost-effective way to run a selection of empty models [CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models Nov 1, 2023
@graciegoheen graciegoheen changed the title [CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models [CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models for dbt build and run Nov 1, 2023
@colin-rogers-dbt
Copy link
Contributor

what if instead of a --empty flag we had a flag like --model-limit that accepted an integer input that we pass to a limit clause

@graciegoheen
Copy link
Contributor Author

@colin-rogers-dbt we've done a lot of thinking about that!

@MichelleArk actually attempted this not to long ago:

but ran into enough complexities, that we decided it would be best to start with an --empty flag, which we could potentially extend for "sampling" in the future

would welcome your thoughts on the --sample issue :)

@FishtownBuildBot
Copy link
Collaborator

Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#6131

@dbeatty10 dbeatty10 changed the title [CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models for dbt build and run [CT-3309] --empty flag to to provide a cost-effective way to run a selection of empty models for dbt build and run Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
empty Issues related to the --empty CLI flag user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants