-
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-3259] [Regression] Running empty seed file raises unhandled exception #8895
Comments
Happens on both snowflake and big query. dbt-snowflakedbt -d seed -s empders --full-refresh
> Database Error in seed empders (seeds/empders.csv)
002040 (42601): SQL compilation error:
Unsupported data type 'NONE'. There's no stacktrace here, but looking at Snowflake query history, this is the generated query that fails, obviously create table TEST_DB.dbt_ajs.empders (col1 None,col2 None) dbt-bigqueryhere's dbt-bigquery stacktrace (relevant exract below).
File "/Users/dataders/miniforge3/envs/dbt/lib/python3.10/site-packages/dbt/adapters/bigquery/impl.py", line 781, in load_dataframe
load_config.schema = bq_schema
File "/Users/dataders/miniforge3/envs/dbt/lib/python3.10/site-packages/google/cloud/bigquery/job/base.py", line 172, in __setattr__
super(_JobConfig, self).__setattr__(name, value)
File "/Users/dataders/miniforge3/envs/dbt/lib/python3.10/site-packages/google/cloud/bigquery/job/load.py", line 477, in schema
[field.to_api_repr() for field in value],
File "/Users/dataders/miniforge3/envs/dbt/lib/python3.10/site-packages/google/cloud/bigquery/job/load.py", line 477, in <listcomp>
[field.to_api_repr() for field in value],
File "/Users/dataders/miniforge3/envs/dbt/lib/python3.10/site-packages/google/cloud/bigquery/schema.py", line 281, in to_api_repr
if self.field_type.upper() in _STRUCT_TYPES:
AttributeError: 'NoneType' object has no attribute 'upper' |
Yes exactly we used to see dbt creating a blank table with 3 columns |
It looks like the def load_dataframe(self, database, schema, table_name, agate_table, column_override):
bq_schema = self._agate_to_schema(agate_table, column_override)
print("BQ-SCHEMA")
print(bq_schema)
In 1.5 it infers it as an Integer (I didn't specify the seed schema in the yaml):
|
Same happens in Redshift, after updating to 1.6.6 This is my csv
When I add empty second row, it works
but ofc I do not want that extra |
@jan-benisek this issue is in our current sprint, so accounting for potential roll over: between 1.5-3 weeks. |
Is this a regression in a recent version of dbt-core?
Current Behavior
We have an empty seed file in one of our dbt projects (Sometimes we need to manually intervene and add lines to it) that has been running successfully for a while now but after upgrading to dbt 1.6.6 you get an unhandled exception when compiling:
Expected/Previous Behavior
In
dbt 1.5.x
it works fine:Steps To Reproduce
Then when you run
dbt build/seed
you will see the error.Relevant log output
Environment
Which database adapter are you using with dbt?
bigquery
Additional Context
No response
The text was updated successfully, but these errors were encountered: