Data-Engineer-Camp/dbt-dimensional-modelling

dbt seed bigquery 'NoneType' object has no attribute 'upper'

Closed this issue · 2 comments

I am not sure if this is relevant, since this is related to dbt-bigquery.

For commit hash f04d187

I changed profiles.yml for a bigquery project and changed the variable types in seed ymls (e.g. varchar -> string, smallint -> integer, timestamptz -> timestamp)

When running dbt seed --target bigquery I run into the error:

 19:42:56  Running with dbt=1.5.1
19:42:57  Unable to do partial parsing because config vars, config profile, or config target have changed
19:42:59  Found 8 models, 42 tests, 0 snapshots, 0 analyses, 468 macros, 0 operations, 15 seed files, 0 sources, 0 exposures, 0 metrics, 0 groups
19:42:59  
19:43:00  Concurrency: 12 threads (target='bigquery')
19:43:00  
19:43:00  1 of 15 START seed file person.address ......................................... [RUN]
19:43:00  2 of 15 START seed file person.countryregion ................................... [RUN]
19:43:00  3 of 15 START seed file sales.creditcard ....................................... [RUN]
19:43:00  4 of 15 START seed file sales.customer ......................................... [RUN]
19:43:00  5 of 15 START seed file date.date .............................................. [RUN]
19:43:00  6 of 15 START seed file person.person .......................................... [RUN]
19:43:00  7 of 15 START seed file production.product ..................................... [RUN]
19:43:00  8 of 15 START seed file production.productcategory ............................. [RUN]
19:43:00  9 of 15 START seed file production.productsubcategory .......................... [RUN]
19:43:00  10 of 15 START seed file sales.salesorderdetail ................................ [RUN]
19:43:00  11 of 15 START seed file sales.salesorderheader ................................ [RUN]
19:43:00  12 of 15 START seed file sales.salesorderheadersalesreason ..................... [RUN]
19:43:00  Unhandled error while executing 
'NoneType' object has no attribute 'upper'
19:43:00  7 of 15 ERROR loading seed file production.product ............................. [ERROR in 0.54s]
19:43:00  13 of 15 START seed file sales.salesreason ..................................... [RUN]
19:43:05  2 of 15 OK loaded seed file person.countryregion ............................... [INSERT 238 in 5.03s]
19:43:05  14 of 15 START seed file person.stateprovince .................................. [RUN]
19:43:05  5 of 15 OK loaded seed file date.date .......................................... [INSERT 731 in 5.05s]
19:43:05  15 of 15 START seed file sales.store ........................................... [RUN]
19:43:05  8 of 15 OK loaded seed file production.productcategory ......................... [INSERT 4 in 5.20s]
19:43:05  9 of 15 OK loaded seed file production.productsubcategory ...................... [INSERT 37 in 5.20s]
19:43:05  1 of 15 OK loaded seed file person.address ..................................... [INSERT 1675 in 5.35s]
19:43:05  13 of 15 OK loaded seed file sales.salesreason ................................. [INSERT 10 in 4.81s]
19:43:06  6 of 15 OK loaded seed file person.person ...................................... [INSERT 2057 in 5.88s]
19:43:06  12 of 15 OK loaded seed file sales.salesorderheadersalesreason ................. [INSERT 1710 in 6.08s]
19:43:06  4 of 15 OK loaded seed file sales.customer ..................................... [INSERT 19820 in 6.20s]
19:43:06  11 of 15 OK loaded seed file sales.salesorderheader ............................ [INSERT 1566 in 6.42s]
19:43:06  10 of 15 OK loaded seed file sales.salesorderdetail ............................ [INSERT 5716 in 6.61s]
19:43:07  3 of 15 OK loaded seed file sales.creditcard ................................... [INSERT 19118 in 7.35s]
19:43:09  14 of 15 OK loaded seed file person.stateprovince .............................. [INSERT 181 in 4.57s]
19:43:10  15 of 15 OK loaded seed file sales.store ....................................... [INSERT 701 in 4.85s]
19:43:10  
19:43:10  Finished running 15 seeds in 0 hours 0 minutes and 11.22 seconds (11.22s).
19:43:10  
19:43:10  Completed with 1 error and 0 warnings:
19:43:10  
19:43:10  'NoneType' object has no attribute 'upper'
19:43:10  
19:43:10  Done. PASS=14 WARN=0 ERROR=1 SKIP=0 TOTAL=15

Any advise?

My bad - one of the columns in the yml file was left without a type.

Ah, thank you @hududed ! Which file and column was that? I can make a PR to fix it.