Closed borjavb closed 1 day ago
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:
SchemaField
class now requires range_element_type
for fields with type RANGE
in later versions (as you mentioned)range_element_type
was added in version 3.15.0
, but it's not present in the prior 3.14.1
versionRANGE
to try to update the description
google-cloud-bigquery==3.15.0
, it worked just finegoogle-cloud-bigquery==3.14.1
, I hit the same error you mentioned in this issue
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
Environment
Additional Context
No response