-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-99] [Spike] Enable loading dbt_project config outside of task structure #4630
Comments
Spike: project configs before task runsIn order to access project data earlier in the runtime process dbt needs to be able to generate a ProjectConfig object before starting the task. TL;DRI can envision a few different ways to meet his need with varying degrees of ease and correctness
Research:Task dependency graphNotes on Pre-task configs, tracing through the codebase to generationArgumentsFrom command line
FlagsPartially depends on
Contents of user profileRead multiple times, this is the first one
Task configsRuntime / UnsetProfile configs
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers. |
There is some information in the dbt_project.yml file which it would be good to have access to prior to creating a particular task. In addition, being able to separate out project object creation would be useful for testing purposes, for both changes to project files and for constructing fixtures for tests.
There are two Project classes. One is in core/dbt/config/project.py and one is in core/dbt/contracts/project.py, which is a bit confusing. The core/dbt/config/project.py imports the contracts project class as ProjectContract. Roughly speaking the contract project matches to the yaml file, and the config project is used to create the RuntimeConfig.
One of the non-optimal side effects of this is that when a field is added to the dbt_project.yml file, fields have to be added both in the two Project classes and the in the multiple places where fields are copied from contract project to config project, to RuntimeConfig.
Investigate the feasibility of building the contracts Project and the config Project prior to constructing tasks.
The text was updated successfully, but these errors were encountered: