Closed nam-97 closed 4 months ago
Thanks for raising this.
Would you be able to check the dbt log file and/or Snowflake logs to find the exact statement that failed?
Also got this error in BQ. Error is there: Inserted row has wrong column count; Has 8, expected 5 at [3:1]
Hereby the exact query the db got. Did trim it a bit, but the gest is still there.
/* {"app": "dbt", "dbt_version": "1.8.1", "profile_name": "dbt_project", "target_name": "test", "node_id": "model.dbt_project_evaluator.base_source_columns"} */
INSERT INTO
`project`.`dataset`.`base_source_columns`
VALUES
(
'''source.dbt_project.dbt_source.source_table''',
'''_airbyte_raw_id''',
'''''',
'''string''',
'''[]''',
FALSE,
0,
'''None'''
),
...
(
'''source.dbt_project.dbt_source.source_table''',
'''_airbyte_extracted_at''',
'''''',
'''timestamp''',
'''[]''',
FALSE,
0,
'''None'''
);
Thanks a lot!
OK, so I can definitely see the error now. This is a bug in the code but we are actually not testing it in CI. I will add a new test and release a new patch version soon.
0.12.1 should be available in a bit in the dbt Hub
Describe the bug
When running the model
base_source_columns
bydbt run
, I encounter below errorSteps to reproduce
Expected results
Actual results
Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:Additional context
The problem locates on the
post-hook
parameter in the model, since the query to create table still can be run in Snowflake. Probably, the post-hook query is trying to insert more columns than the ones existing in the output objectAre you interested in contributing the fix?