debugging-failed-data-quality-checks
यह क्या करती है
यह स्किल बताती है कि कोई डेटा जाँच लाल क्यों है, वे पंक्तियाँ दिखाती है जिनसे यह हुआ, और क्या बदलना चाहिए यह सुझाती है। यह उन लोगों के लिए है जो वेयरहाउस डेटा की देखरेख करते हैं और विफल जाँच पर कार्रवाई करनी होती है।
कब इस्तेमाल करें
- ✓जब कोई डेटा गुणवत्ता जाँच failed या errored दिखाए और आप कारण जानना चाहें।
- ✓जब आप देखना चाहें कि जाँच ने कौन सी खास पंक्तियाँ पकड़ीं।
- ✓जब रिफ़्रेश के बाद कोई मैटेरियलाइज़्ड व्यू Not published संदेश या पुराना डेटा दिखाए।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/products/data_quality/skills/debugging-failed-data-quality-checks/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी orders की यूनिकनेस जाँच क्यों विफल हो रही है, और कौन सी पंक्तियाँ डुप्लिकेट हैं?”
हर हफ़्ते 5 नई skills, 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
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।