debugging-failed-data-quality-checks
하는 일
이 스킬은 데이터 점검이 빨간색인 이유를 설명하고, 그 원인이 된 행을 보여 주며, 무엇을 바꿔야 할지 제안합니다. 웨어하우스 데이터를 관리하면서 실패한 점검에 대응해야 하는 사람을 위한 것입니다.
사용하는 경우
- ✓데이터 품질 점검이 failed나 errored로 표시되고 원인을 알고 싶을 때.
- ✓점검이 맞춘 특정 행을 보고 싶을 때.
- ✓구체화된 뷰가 Not published 메시지나 새로 고침 후 오래된 데이터를 보일 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/data_quality/skills/debugging-failed-data-quality-checks/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 주문 고유성 점검이 왜 실패하나요? 어떤 행이 중복인가요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
먼저 점검의 상태를 읽습니다. 그것이 문제가 데이터에 있는지, 점검 자체에 있는지, 또는 실행할 수 없었던 쿼리에 있는지 보여 주기 때문입니다. 그다음 일치하는 행을 봅니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Debugging failed data quality checks
A check run ends in one of four states. Read the state first, because it decides where the problem is:
| Status | Meaning | Where to look |
|---|---|---|
failed |
The query ran and the assertion found bad data | The data, or the assertion itself |
errored |
The query could not run, so nothing was judged | The error text (never a data problem) |
skipped |
The subject is gone | Whether the table or view still exists |
passed |
The assertion held | Nothing |
row_count and freshness checks judge observed_value, not failed_row_count.
A failed row_count means the count fell outside its bounds.
A failed freshness means the newest row is older than the limit.
When to use this skill
- A check or a subject shows
failedorerroredand the user wants to know why - The user wants to see the rows a check matched
- A materialized view's latest run shows an error that starts with
Not published: - A view kept serving old data after a refresh, and the data quality gate is on
- Another skill (
authoring-data-quality-checksorauditing-warehouse-view-health) found a failing check or a blocked view and handed it off
Available tools
| Tool | Purpose |
|---|---|
posthog:data-quality-check-results |
A check's recent runs, with compiled_query, error and the config it ran |
posthog:execute-sql |
Re-run a run's compiled_query to see the failing rows |
posthog:data-quality-check-run |
Run a check now |
posthog:data-quality-check-update |
Fix an assertion or change its severity |
view-get |
A view's definition and status |
view-run-history |
A view's materialization runs and their errors |
view-run |
Materialize a view again |
To find the failing checks, query system.information_schema.data_quality_checks for last_status IN ('failed', 'errored'), or system.information_schema.data_quality_health for a subject's verdict.
Workflow
Step 1: Read the run
Call posthog:data-quality-check-results for the check.
On the newest run, read:
statusanderrorcheck_configandcheck_severity: what the run asserted, which can differ from the check todaycompiled_query: HogQL that selects the failing rows. Forrow_countit returns the count instead, so judge that check byobserved_value.audited_staged_refresh: true when the run was part of a gated audit of a refresh before it was published. An errored run can carry it too, so readstatusfirst.
Retention clears compiled_query after 30 days.
For an older run, run the check again.
Step 2: Look at the failing rows
Run compiled_query with posthog:execute-sql.
An empty compiled_query means there is nothing to replay: retention cleared it, or a gated run could not read the view's definition.
Look at what it matched before you report anything.
A failure means one of two things: the data is bad, or the assertion is wrong.
The rows tell you which.
When audited_staged_refresh is true, the query does not read the published table.
It holds the view's definition in a WITH clause and reads the view's source tables now.
The sources may have changed since the run, so the rows and the count can differ from the run.
A query that now returns zero rows does not prove that the refresh was clean.
Compare with failed_row_count on the run.
Step 3: Read an errored run
An errored run did not judge the data. Match the error text:
| Error text | Cause and fix | | ---
자주 묻는 질문
errored는 무엇을 뜻하나요?
점검 쿼리를 실행할 수 없었다는 뜻이므로 아무것도 판단되지 않았습니다. 보통 문제는 데이터가 아니라 오류 메시지에 있습니다.
행 수 점검에서 실패한 행이 없는 이유는 무엇인가요?
행 수 점검은 관측된 개수를 범위와 비교해 판단하므로, 일치하는 행을 찾는 대신 그 개수를 읽어야 합니다.
뷰에 Not published가 뜨는 것은 무엇을 뜻하나요?
데이터 품질 게이트를 통과하지 못해 새로 고침이 막혔다는 뜻이며, 그래서 새 데이터는 게시되지 않았습니다.
상세 정보
작성자의 원본 설명
Finds out why a data quality check failed or errored, looks at the rows it matched, and recommends the fix. Also covers a materialized view refresh that the data quality gate did not publish. Use when asked why a check is red, what rows failed, why a view shows "Not published", why a view's data is stale after a refresh, or how to get a blocked refresh published. Trigger terms: failed check, failing rows, errored check, data quality failure, not published, blocked materialization, unpublished refresh, check keeps failing.
repo: PostHog/posthog
인기도
- GitHub 스타
- 41k
- 순위
- #6855
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.