dbt-labs / dbt-labs/dbt

[Feature] Extend partial parsing behavior for env vars to project vars also

Open
#10,578 2 comments 2 reactions 0 assignees View on GitHub
engine:v1 type:feature
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this your first time submitting a feature request?

- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] 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 [project vars](https://docs.getdbt.com/docs/build/project-variables) 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](https://docs.getdbt.com/docs/build/environment-variables) to [project vars](https://docs.getdbt.com/docs/build/project-variables). I believe the relevant partial parsing code related to environment variables is [here](https://github.com/dbt-labs/dbt-core/blob/9ca1bc5b4ced0a1b7fc29747062b00ed1f0d2f86/core/dbt/parser/partial.py#L1025-L1031).

### 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](https://docs.getdbt.com/reference/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 https://github.com/dbt-labs/docs.getdbt.com/issues/1066#issuecomment-2015122367 and https://github.com/dbt-labs/dbt-core/pull/9844#issuecomment-2038133642

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.