question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Equality test: failures => '0' is not of type integer

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TimoKruthcommented, Nov 26, 2021

Possible hacky solutions see at dbt-core Further work will be discussed at dbt-exasol

0reactions
joellabescommented, Nov 24, 2021

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Equality test: failures => '0' is not of type integer #4335
When I run an equality test from dbt_utils on a seed and a model/table I get the error that '0' is not an...
Read more >
Testing not equal in Quickcheck? - haskell - Stack Overflow
The problem I have with answering this question sensably via QC is you didn't give a full ADT. You see the definition of...
Read more >
Maven Surefire Plugin – Rerun failing tests
If rerunFailingTestsCount is set to a value smaller than or equal to 0, then it will be ignored. Output flaky re-run information on...
Read more >
isNaN() - JavaScript - MDN Web Docs
Number.isNaN() is a more reliable way to test whether a value is the number value NaN or not. Alternatively, the expression x !==...
Read more >
Advanced googletest Topics
testing ::AssertionResult IsEven(int n) { if ((n % 2) == 0) return ... If changing the function's type is not an option, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found