Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dbt-artifacts

БесплатноЗапускает вложенные скриптыНе проверен

Monitor dbt execution using the dbt Artifacts package. Use this skill when you need to track test and model execution history, analyze run patterns over time…

sfc-gh-dflippoот sfc-gh-dflippo★ 35 звёзд на GitHub8 установок в других каталогах

Об этом скилле

dbt Artifacts Package - AI Instructions

Purpose

This skill enables AI agents to help users monitor dbt execution using the brooklyn-data/dbt_artifacts package. The package captures detailed execution metadata during dbt runs and stores it in queryable tables for analysis and monitoring.

When to Use This Skill

Activate this skill when users ask about:

  • Tracking test and model execution history
  • Analyzing dbt run patterns over time
  • Monitoring data quality metrics from dbt tests
  • Investigating dbt performance issues or slow models
  • Setting up execution logging and observability
  • Querying dbt execution metadata programmatically
  • Comparing dbt monitoring approaches (Artifacts vs Event Tables)

What dbt Artifacts Does

The package captures one row per dbt artifact execution (models, tests, seeds, snapshots) with:

  • Execution status: success, error, skipped, fail, warn
  • Runtime metrics: Duration, rows affected, compile time
  • Test results: Failure counts, error messages
  • Run context: Command, environment, dbt version, threading
  • Dependencies: Model lineage and relationships

Core Tables Reference

Table Purpose Key Columns
invocations One row per dbt run command_invocation_id, dbt_command, target_name, run_started_at
model_executions Model runtime performance status, total_node_runtime, rows_affected, materialization
test_executions Data quality tracking status, failures, total_node_runtime, message
seeds Seed file execution Similar to model_executions
snapshots Snapshot execution Similar to model_executions with SCD tracking
sources Source freshness Freshness check results
exposures Exposure execution Exposure dependencies

Join Pattern: Always join through command_invocation_id (links all executions in a run) and node_id (identifies specific artifact).

Installation & Setup

When users need to install or configure dbt Artifacts:

Step 1: Add Package

Add to packages.yml:

packages:
  - package: brooklyn-data/dbt_artifacts
    version: 2.9.3

Step 2: Configure Hook

Add to dbt_project.yml:

on-run-end:
  - "{{ dbt_artifacts.upload_results(results) }}"

models:
  dbt_artifacts:
    +database: your_database
    +schema: dbt_artifacts

Step 3: Install and Initialize

dbt deps
dbt run --select dbt_artifacts

After first run, all subsequent dbt invocations automatically log results.

Helping Users with Queries

Query Strategy

When users ask for monitoring queries:

  1. Identify the goal: What are they trying to monitor? (test failures, slow models, run history, etc.)
  2. Reference query library: Point to relevant queries in the scripts/ directory (see Monitoring Queries section below)
  3. Customize as needed: Adjust date ranges, filters, thresholds
  4. Explain results: Help interpret the output and recommend actions

Common Query Patterns

All queries are available as individual executable scripts. See the Monitoring Queries section below for detailed descriptions and usage.

Query Best Practices

ALWAYS recommend these patterns:

  • ✅ Filter by run_started_at with specific date range (performance)

    WHERE run_started_at >= DATEADD(day, -7, CURRENT_TIMESTAMP())
    
  • ✅ Use command_invocation_id to link related executions efficiently

  • ✅ Filter HAVING COUNT(*) >= 5 for meaningful aggregations

  • ✅ Join through both command_invocation_id AND node_id when linking metadata to executions

NEVER do these:

  • ❌ Query entire table without date filtering

    -- BAD: Scans entire history
    SELECT * FROM test_executions WHERE status = 'fail';
    
    -- GOOD: Filtered by date
    SELECT * FROM test_executions
    WHERE status = 'fail'
      AND run_started_at >= DATEADD(day, -7, CURRENT_TIMESTAMP());
    
  • ❌ Create alerts for every single test failure (too noisy)

  • ❌ Store more than 6 months without archival strategy

Storage Management

Archival Strategy (Quarterly):

-- Archive data older than 90 days
CREATE TABLE dbt_artifacts_archive.model_executions_2024_q4 AS
SELECT *
FROM dbt_artifacts.model_executions
WHERE run_started_at < DATEADD(day, -90, CURRENT_DATE());

-- Delete archived data from active tables
DELETE FROM dbt_artifacts.model_executions
WHERE run_started_at < DATEADD(day, -90, CURRENT_DATE());

Storage Planning:

  • Small project (5
Полный SKILL.md на GitHub

Установить dbt-artifacts в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/dbt_run_summary.sqlscripts/model_execution_errors.sqlscripts/performance_regression_detection.sqlscripts/recent_test_failures.sqlscripts/slowest_models.sqlscripts/test_execution_trends.sqlscripts/test_reliability_metrics.sql

FAQ

Что делает скилл dbt-artifacts?

Monitor dbt execution using the dbt Artifacts package. Use this skill when you need to track test and model execution history, analyze run patterns over time, monitor data quality metrics, or enable programmatic access to dbt execution metadata across any dbt version or platform.

Как установить скилл dbt-artifacts?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dbt-artifacts запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить dbt-artifacts с