Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbtTestFail: test.calitp_warehouse.unique_fct_service_alerts_messages_key.56f5dcb24c - Got 360 results, config... #3726

Open
cal-itp-sentry bot opened this issue Feb 19, 2025 · 0 comments

Comments

@cal-itp-sentry
Copy link

cal-itp-sentry bot commented Feb 19, 2025

Sentry Issue: CAL-ITP-DATA-INFRA-2CP0

DbtTestFail: test.calitp_warehouse.unique_fct_service_alerts_messages_key.56f5dcb24c - Got 360 results, configured to fail if != 0

Tables: mart_gtfs.fct_service_alerts_messages
Column: key ('_extract_ts', 'base64_url', 'id')

Failing because of 360 records where key ('_extract_ts', 'base64_url', 'id') is not unique

with dbt_test__target as (

  select key as unique_field
  from (select * from `cal-itp-data-infra`.`mart_gtfs`.`fct_service_alerts_messages` where
            dt in (
                '2025-02-14',
                '2025-02-13'
                )

            AND hour in (
                '2025-02-14 00:00:00',
                '2025-02-13 02:00:00'
            )
            ) dbt_subquery
  where key is not null

)

select
    unique_field,
    count(*) as n_records

from dbt_test__target
group by unique_field
having count(*) > 1
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

No branches or pull requests

0 participants