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

[Feature] Extend partial parsing behavior for env vars to {{ target }} also #10579

Open
3 tasks done
dbeatty10 opened this issue Aug 16, 2024 · 1 comment
Open
3 tasks done
Labels
enhancement New feature or request

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Aug 16, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Avoid full parses and use partial parsing when {{ target }} values have not changed.

The implementation would more granularly track where those inputs are being used — that is, extending what we've done for env vars to {{ target }}. I believe the relevant partial parsing code related to environment variables is here.

Describe alternatives you've considered

No response

Who will this benefit?

This will allow dbt to complete the parsing phase faster by using partial parsing to only parse the changed files (or files related to those changes).

Are you interested in contributing this feature?

No response

Anything else?

From dbt-labs/docs.getdbt.com#1066 (comment) and #9844 (comment)

@jaysobel
Copy link

I think this is the parent for an issue I just experienced.

Basically when you run the following commands:

  1. dbt build -s some_model
  2. dbt build -s some_model
  3. dbt build -s some_model --target default_target

You only get partial parsing on (2). Even though the passed target to (3) is the default target that was used for (1) and (2), you still get a Unable to do partial parsing warning, and the slower startup time.

And when you add:

  1. dbt build -s some_model

You again get Unable to do partial parsing.

This is a problem for 3rd party tools that populate the defaults proactively (read: dbt Power User run buttons) because any interspersing of manual commands gives you this thrashing back and forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants