Skip to content

Update upload_invocations.sql#549

Open
jelerson wants to merge 1 commit intobrooklyn-data:mainfrom
jelerson:main
Open

Update upload_invocations.sql#549
jelerson wants to merge 1 commit intobrooklyn-data:mainfrom
jelerson:main

Conversation

@jelerson
Copy link
Copy Markdown

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

  • Minor bug fix
  • Documentation improvements
  • Quality of Life improvements
  • New features (non-breaking change)
  • New features (breaking change)
  • Other (non-breaking change)
  • Other (breaking change)
  • Release preparation

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?

  • Snowflake
  • Google BigQuery
  • Databricks
  • Spark
  • N/A

Handle when dbt-fusion passes in a None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant