Skip to content

If both tables contain zero rows results in an error in Snowflake. Ths is caused by the consequence that group by 1 returns no rows, so the resulting test contains no rows. This is solved by removing the grouping if there are no group by columns defined#1072

Open
FrankTub wants to merge 1 commit intodbt-labs:mainfrom
BEEQUIP:fix/both-zero-number-of-rows

Conversation

@FrankTub
Copy link
Copy Markdown

In Snowflake a query like the following returns no rows.

select 1 as id_dbtutils_test_equal_rowcount,
  count(*)
from my_table
group by 1

If both tables do not contain a row the following error will be raised:

13:10:13    None is not of type 'integer'

Failed validating 'type' in schema['properties']['failures']:
    {'type': 'integer'}

On instance['failures']:
    None
13:10:13  

This PR solves that issue

…is is caused by the consequence that group by 1 returns no rows, so the resulting test contains no rows. This is solved by removing the grouping if there are no group by columns defined

Add test commit

Fix logic

test commit

test

test

test

test

test

Small fix
@FrankTub FrankTub requested a review from a team as a code owner February 26, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant