Equality test: failures => '0' is not of type integer
See original GitHub issueDescribe the bug
When I run an equality test on a seed and a model/table I get the error that ‘0’ is not an integer. It works in version 0.20.2 but not anymore in 0.21.0
Steps to reproduce
Create following 3 files in corresponding folders for seeds and models. testcsv.csv
"A"
1
test.sql
select 1 as A from dual
test.yml
version: 2
seeds:
- name: testcsv
columns:
- name: A
tests:
- dbt_utils.equality:
compare_model: ref('test')
compare_columns:
- A
dbt seed
dbt run
dbt test
(–schema optionally)
Expected results
Running with dbt=0.20.2
Found 64 models, 15 tests, 0 snapshots, 0 analyses, 361 macros, 0 operations, 25 seed files, 77 sources, 0 exposures
13:36:02 | Concurrency: 2 threads (target='unittest')
13:36:02 |
13:36:02 | 1 of 1 START test dbt_utils_equality_testcsv_A__ref_test_............ [RUN]
13:36:03 | 1 of 1 PASS dbt_utils_equality_testcsv_A__ref_test_.................. [PASS in 0.17s]
13:36:03 |
13:36:03 | Finished running 1 test in 0.57s.
Completed successfully
Done. PASS=1 WARN=0 ERROR=0 SKIP=0 TOTAL=1
Actual results
Running with dbt=0.21.0
Found 64 models, 15 tests, 0 snapshots, 0 analyses, 376 macros, 0 operations, 25 seed files, 77 sources, 0 exposures
13:31:58 | Concurrency: 2 threads (target='unittest')
13:31:58 |
13:31:58 | 1 of 1 START test dbt_utils_equality_testcsv_A__ref_test_............ [RUN]
Unhandled error while executing test.dib.dbt_utils_equality_testcsv_A__ref_test_.145311c1ec
'0' is not of type 'integer'
Failed validating 'type' in schema['properties']['failures']:
{'type': 'integer'}
On instance['failures']:
'0'
13:31:58 | 1 of 1 ERROR dbt_utils_equality_testcsv_A__ref_test_................. [ERROR in 0.15s]
13:31:58 |
13:31:58 | Finished running 1 test in 0.49s.
Completed with 1 error and 0 warnings:
'0' is not of type 'integer'
Failed validating 'type' in schema['properties']['failures']:
{'type': 'integer'}
On instance['failures']:
'0'
Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
Screenshots and log output
Unhandled error while executing test.dib.dbt_utils_equality_expected__calc_gueltig_von_TF1_META_GUELTIG_VON__ref_calc_gueltig_von_.3c591b58f9
'0' is not of type 'integer'
Failed validating 'type' in schema['properties']['failures']:
{'type': 'integer'}
On instance['failures']:
'0'
System information
packages:
- package: dbt-labs/dbt_utils
version: 0.7.4
Which database are you using dbt with?
- [-] postgres
- [-] redshift
- [-] bigquery
- [-] snowflake
- other (specify: Exasol)
The output of dbt --version
:
dbt --version
installed version: 0.21.0
latest version: 0.21.0
Up to date!
Plugins:
Additional context
Same dbt-exasol adapter is used in both versions.
Are you interested in contributing the fix?
I would need a hand. Can’t figure out where it goes wrong or why. I guess it failes at this place in dbt-core but since it depends on this dbt-utils.equality test I posted it here: https://github.com/dbt-labs/dbt-core/blob/719b2026ab847ab887d3638c81a351b0f6f96158/core/dbt/task/test.py#L212
Let me know if I can help any further
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Possible hacky solutions see at dbt-core Further work will be discussed at dbt-exasol
In that case, I think you’d be best to open an issue on the exasol adapter, as it won’t be something that dbt-utils itself can fix. Does that sound right to you?