You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
When using the new RANGE type, in a model, the model will be created correctly, but dbt will fail while trying to update the descriptions of the schema: 400 PATCH <> Range field <field> must have a range element type.
borjavb
changed the title
[Bug] New RANGE type in bigquery not working when setting descriptions
[Bug] New RANGE type in bigquery failing when setting descriptions
Sep 11, 2024
Hey, @borjavb. I was interested in this and took a quick look. Seems to work for me based on some cursory playing around. Are you able to confirm what version of google-cloud-bigquery is running under the hood?
A few observations:
Looks like the SchemaField class now requires range_element_type for fields with type RANGE in later versions (as you mentioned)
Is this a new bug in dbt-bigquery?
Current Behavior
When using the new RANGE type, in a model, the model will be created correctly, but dbt will fail while trying to update the descriptions of the schema:
400 PATCH <> Range field <field> must have a range element type.
The new SchemaField for RANGE data types expects an extra parameter
range_element_type
with values {date,datetime,timestamp} in order to work https://cloud.google.com/python/docs/reference/bigquery/latest/google.cloud.bigquery.schema.SchemaFieldExpected Behavior
dbt runs correctly and applies the column descriptions without erroring
Steps To Reproduce
Create a model with its respective yaml file description, and run it
table_a.sql
table_a.yaml
Relevant log output
400 PATCH <> Range field column_range must have a range element type.
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: