-
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-998] [Bug] Provide a more helpful error when a project-level config is Undefined and cannot be deepcopied #5618
Comments
@jesperdejby Thanks for opening, and for the clear restatement! I was able to reproduce this quite easily. Indeed, the issue here is that, when A temporary fix is to provide an - project: "{{ 'dwh-prod' if target.name == 'prod' else 'something_else' }}" I agree that the error message here is not very helpful in identifying the root cause. I'm going to reframe this issue as: dbt should provide a more helpful error when a project-level config is Undefined and cannot be deepcopied. |
@jtcohen6 Thank you for the quick response and help 🙏 . |
We're going to need to take a closer look to see if there is a reasonable place/way to determine when |
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 comment on the issue or else 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. Just add a comment to notify the maintainers. |
Is this a new bug in dbt-core?
Current Behavior
DBT version 1.0.0
Plugins:
I tried executing
dbt run --select my_model
with the following syntax in my dbt_project.yml file:The IF statement - project: "{{ 'dwh-prod' if target.name == 'prod' }}" is incomplete and will return the error message:
Expected Behavior
If you want to grant access to this project you could just write: - project: prod. I expect the error message to be more descriptive than:
If you get a hint on that the if-statement can't be parsed or something along these lines you could identify where the problem lies. I managed to reverse engineer this by finding #2110 and concluding this was not caused by my models/refs and I started looking into the dbt_project.yml file.
Steps To Reproduce
dwh:
+database: db_name
dataset:
+schema: schema_name
+grant_access_to:
- project: "{{ 'dwh-prod' if target.name == 'prod' }}"
dataset: mydataset
Relevant log output
cannot pickle 'Undefined' object
Which database adapter are you using with dbt?
bigquery
Additional Context
No response
The text was updated successfully, but these errors were encountered: