Hi everyone, Can someone help me to figure out ho...
# community-support
n
Hi everyone, Can someone help me to figure out how Test results breakdown chart in the report dashboard is formed? The description tells it's "Latest unique test results by status". So I tried this query (Snowflake):
Copy code
WITH elementary_test_results AS (
    SELECT 
        *,
        ROW_NUMBER() OVER (
            PARTITION BY test_unique_id ORDER BY detected_at DESC
        ) AS row_num
    FROM
        {{ ref('elementary_test_results') }}
)

SELECT *
FROM elementary_test_results
WHERE row_num = 1
ORDER BY detected_at DESC
But the numbers don't match. The report has 2557 records, while my query returns 1185 records. What am I doing wrong? Maybe I missed some crucial part of the documentation where it is described? Thanks in advance!
m
Hey @Nick Linnik, That's interesting. Do you use elementary anomaly detection tests? Also do you mind sharing the report itself with me in DM? I could look at the raw data there and understand how many unique tests are there
n
Sorry for such a late reply, we were investigating a lot, fixed most of the problems, however we still have issues with anomaly detection test results granularity. I noticed that all column tests are displayed as one per table record in
dbt_tests
and as one per column per type in UI report. I am not sure how to get same granularity out of my DB.