mutually_exclusive_ranges
test breaks when using --store-failures
on BigQuery #423
Closed
Description
Describe the bug
When running a test suite which includes the mutually_exclusive_ranges
test and using the --store-failures
option, dbt fails when trying to insert rows into the target database, specifically BigQuery. Here are some example error messages that we've received:
Database Error in test dbt_utils_mutually_exclusive_ranges_qb_payment_filter_not_allowed__dbt_valid_from__qb_payment_id_invoice_payment_id__dbt_valid_to (models/staging/filters/qb/qb_payment_filter.yml)
CREATE TABLE columns must be named, but column 1 has no name at [9:6]
Database Error in test dbt_utils_mutually_exclusive_ranges_qb_project_balances_filter_not_allowed__dbt_valid_from__qb_project_id_qb_account_id__dbt_valid_to (models/staging/filters/qb/qb_project_balances_filter.yml)
CREATE TABLE columns must be named, but column 1 has no name at [9:6]
Steps to reproduce
- Have a
mutually_exclusive_ranges
test - Run
dbt test --store-failures
Expected results
The failures would be logged into a table in BigQuery and there would be no "Database Error" error messages
Actual results
We get the errors above
Screenshots and log output
Database Error in test dbt_utils_mutually_exclusive_ranges_qb_payment_filter_not_allowed__dbt_valid_from__qb_payment_id_invoice_payment_id__dbt_valid_to (models/staging/filters/qb/qb_payment_filter.yml)
CREATE TABLE columns must be named, but column 1 has no name at [9:6]
Database Error in test dbt_utils_mutually_exclusive_ranges_qb_project_balances_filter_not_allowed__dbt_valid_from__qb_project_id_qb_account_id__dbt_valid_to (models/staging/filters/qb/qb_project_balances_filter.yml)
CREATE TABLE columns must be named, but column 1 has no name at [9:6]
System information
packages:
- package: dbt-labs/dbt_utils
version: 0.7.3
- package: tnightengale/dbt_meta_testing
version: 0.3.3
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
<installed version: 0.20.2
latest version: 0.20.2
Up to date!
Plugins:
- bigquery: 0.20.2
- snowflake: 0.20.2
- redshift: 0.20.2
- postgres: 0.20.2
Additional context
Are you interested in contributing the fix?
I could try... :) I'd need to learn the build and testing toolchain but am interested in doing so