auditing-warehouse-view-health
Fungsinya
Skill ini memberikan pemeriksaan menyeluruh atas materialized view Anda, yang menunjukkan mana yang gagal dan mana yang menghabiskan biaya tanpa digunakan. Ditujukan untuk orang yang mengelola data warehouse PostHog.
Kapan dipakai
- βSaat Anda ingin tahu materialized view mana yang rusak.
- βSaat Anda curiga beberapa view menggunakan penyimpanan atau komputasi yang tidak diperlukan siapa pun.
- βSaat dasbor yang dibangun di atas materialized view usang atau menampilkan error.
Link skill
https://github.com/PostHog/posthog/blob/master/products/data_warehouse/skills/auditing-warehouse-view-health/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βMaterialized view mana yang rusak, dan apakah ada yang membuang komputasi?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill mengambil satu daftar semua item yang gagal dan terdegradasi di seluruh pipeline, lalu memeriksa view mana yang dimaterialisasi tetapi tidak digunakan atau usang.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Auditing data warehouse view health
This skill produces a project-wide audit of materialized views (materialized saved queries) in the data warehouse β which ones are failing, and which are materialized but unused. Use it when the user wants a summary of view health, not a deep-dive on one failure.
The same underlying endpoint (data-warehouse-data-health-issues-retrieve) also reports source, sync, batch-export,
and transformation issues. Source and sync health is covered by auditing-warehouse-source-health. Destinations
(batch exports) and transformations are owned by other products β surface them if they appear, but route them to the
relevant team rather than diagnosing here.
When to use this skill
- "Which of my views are broken?" / "Why is this materialized view failing?"
- "Are any of my materialized views wasting compute?"
- Reviewing view health after a HogQL or schema change
- Dashboards backed by materialized views are stale or erroring
Available tools
| Tool | Purpose |
|---|---|
data-warehouse-data-health-issues-retrieve |
One-shot: all failed/degraded items across the whole pipeline |
view-list |
All saved queries / materialized views with status and latest_error |
view-run-history |
Run history for a specific materialized view |
warehouse-suggestions-list |
PostHog's open deprecate / materialize / certify suggestions, if any |
Filter the data-health-issues results to the materialized_view type for this audit. Use view-list when you need
more than the active-failure summary (non-failing views, materialization flags, last-queried info) and
view-run-history to see the run trail for a specific view.
What counts as a view "issue"
From the data-health endpoint, this audit cares about one of the five categories:
type |
Trigger | Typical urgency |
|---|---|---|
materialized_view |
DataWarehouseSavedQuery.is_materialized=true, status=Failed |
Medium |
Each entry includes id, name, type, status, error, failed_at, and url.
The other categories the endpoint returns are out of scope for this skill:
source/external_data_syncβauditing-warehouse-source-healthdestination(batch export) β owned by the batch exports / data pipelines producttransformation(HogFunction) β owned by the CDP / ingestion side
Note the data-health endpoint only reports active failures. For views it doesn't flag:
- Non-materialized views with errors (only materialized views are reported)
- Materialized views that are healthy but unused (costing compute every run) β see Step 4
Workflow
Step 1 β One-shot pull
Call data-warehouse-data-health-issues-retrieve and keep the materialized_view entries.
If there are no view issues, tell the user their materialized views are healthy and stop. Don't invent problems.
Step 2 β Triage failures
Materialized view failures are usually independent of sources β a view failure is a HogQL or data issue in the view
itself (syntax error, missing table reference, type mismatch). For each failing view, surface the error and point
at the offending query. Use view-run-history if the user wants the failure trail.
An error that starts with Not published: is not a query problem. The view's data quality checks failed and the
refresh was held back. Hand off to debugging-failed-data-quality-checks.
Step 3 β Present the audit
Render a prioritized report. Don't dump the raw JSON β human-readable:
## Materialized view health β 2 issues
### π Materialized views (2)
- monthly_revenue β view failed (syntax error in HogQL: 'FORM' instead of 'FROM')
- active_users_30d β view failed (missing table reference)
Both are HogQL issues in the view definitions β independent of your sources. Want me to open one?
Step 4 β Go beyond active failures (when asked)
Start from PostHog's suggestions if the warehouse-suggestions-* tools are available. Call
warehouse-suggestions-list with status=proposed. Pos
Pertanyaan umum
Apakah skill ini memperbaiki view?
Tidak. Skill menghasilkan audit view yang gagal dan tidak digunakan agar Anda dapat memutuskan langkah berikutnya.
Bagaimana dengan masalah sinkronisasi sumber?
Kesehatan sumber dan sinkronisasi dicakup oleh skill audit terpisah, sehingga skill ini berfokus pada materialized view.
Apa itu materialized view?
Itu adalah kueri tersimpan yang hasilnya disimpan dalam tabel fisik, yang dapat lebih cepat dibaca tetapi menggunakan penyimpanan.
Detail
Deskripsi asli dari pembuat
Audit the health of a PostHog project's materialized views (saved queries) β find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks "which of my views are broken?", "why is this materialized view failing?", "are any of my views wasting compute?", or wants a one-shot triage of view health. For source/sync health use `auditing-warehouse-source-health`.
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6856
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
discrawl
394kMemungkinkan agent Anda mencari dan merangkum arsip pesan Discord lokal yang tersimpan, memeriksa seberapa baru arsipnya, dan membaca pesan langsung.
clickhouse-io
280kMembantu agent Anda mengoptimalkan query dan skema di database ClickHouse dengan praktik terbaik analitik berperforma tinggi. Gunakan saat query analitik terlalu lambat.
scientific-db-pubmed-database
280kMembantu agent Anda mencari artikel ilmiah di bidang biomedis. Berguna untuk riset yang membutuhkan informasi medis spesifik.