You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have unexpected behavior when testing against fields that are date only. For example, in many use cases, these tests may check against a field such as batch_date which would be a date-only field that indicates the batch of data that the batch load corresponds to. This test will compare that date to a timestamp. So for example, if you had a test that runs on t-1 lookback that is orchestrated at 10-27 21:00 UTC, you would be comparing 10-26 21:00 UTC vs 10-26 00:00 UTC, and the test would always fail.
My suggestion is to have some type of behavior that checks if the column_name provided is a date field vs a timestamp and perform the check accordingly.
The text was updated successfully, but these errors were encountered:
Hi @chasemeadows, thanks for opening this issue. Could you please add which platform (Postgres, BigQuery, Snowflake) you're on and which version of dbt-expectations you're using? Thanks!
these 2 tests:
https://github.com/calogica/dbt-expectations/blob/main/macros/schema_tests/table_shape/expect_row_values_to_have_recent_data.sql
https://github.com/calogica/dbt-expectations/blob/main/macros/schema_tests/table_shape/expect_grouped_row_values_to_have_recent_data.sql
have unexpected behavior when testing against fields that are date only. For example, in many use cases, these tests may check against a field such as
batch_date
which would be a date-only field that indicates the batch of data that the batch load corresponds to. This test will compare that date to a timestamp. So for example, if you had a test that runs on t-1 lookback that is orchestrated at 10-27 21:00 UTC, you would be comparing 10-26 21:00 UTC vs 10-26 00:00 UTC, and the test would always fail.My suggestion is to have some type of behavior that checks if the
column_name
provided is adate
field vs atimestamp
and perform the check accordingly.The text was updated successfully, but these errors were encountered: