Update upload_invocations.sql#549
Open
jelerson wants to merge 1 commit intobrooklyn-data:mainfrom
Open
Conversation
Handle when dbt-fusion passes in a None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle when dbt-fusion passes in a None
Overview
Adds an if/else condition to the target.threads to handle when None is passed
Update type - breaking / non-breaking
What does this solve?
Currently I'm trying to use the package, but i'm getting an error:
Error dbt1308: failed to execute query: databricks: execution error: failed to execute query: unexpected operation state ERROR_STATE: [UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column, variable, or function parameter with name None cannot be resolved. SQLSTATE: 42703; line 60 pos 8
(in dbt_project.yml:31:3)
--> dbt_project.yml:31:3
Looking into the error, It seems that for target_threads, the value that is being passed in a None
Looking at the macro, it seems that it just tries to grab target.threads, which seems to apply that dbt is just passing the None value in
The fix i found to work seemed to just guard against it by defaulting it to null if a None value is recieved
{# dbt-fusion sets target.threads to None — guard against it #}
{% if target.threads is not none %}{{ target.threads }}{% else %}cast(null as int){% endif %}, {# target_threads #}
Hoping this gets fixed so that we can use the package!
Outstanding questions
What databases have you tested with?