Command Palette

Search for a command to run...

Назад к скиллам
скилл № 23873

data-science-analytics-engineering

Use when the user asks about analytics engineering with dbt: staging/intermediate/mart models, materializations, incremental models, Jinja macros, the dbt…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить data-science-analytics-engineering в Claude Code и Claude Desktop

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

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

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

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

Analytics Engineering

Purpose

Design and build production analytics pipelines with dbt Core (models, materializations, Jinja macros, ref/source, tests, documentation), metrics and semantic layers (dbt Metrics, MetricFlow, Cube.js, metric definitions, dimensions, filters, time granularity), data modeling for analytics (marts approach, One Big Table, dimensional modeling, medallion architecture), and analytical SQL (window functions, CTEs, pivoting, statistical functions, time series, performance optimization, UDFs).

Agent Protocol

Trigger

Exact user phrases: "analytics engineering", "dbt", "dbt model", "dbt materialization", "Jinja macro", "dbt ref", "dbt source", "dbt test", "dbt doc", "metrics layer", "semantic layer", "MetricFlow", "Cube.js", "dbt metrics", "data modeling", "marts approach", "OBT", "One Big Table", "dimensional modeling", "medallion architecture", "bronze silver gold", "SQL analytics", "window function", "CTE", "pivot", "unpivot", "analytical SQL", "time series SQL", "SQL UDF".

Input Context

Before activating, verify:

  • Transformation tool (dbt Core, dbt Cloud, SQLMesh)
  • Data warehouse (Snowflake, BigQuery, Redshift, Databricks, Postgres)
  • BI tools (Tableau, Looker, Power BI, Metabase)
  • Existing data model layer (raw, staging, intermediate, marts)
  • dbt version and packages installed (dbt_utils, dbt_expectations)
  • CI/CD setup (GitHub Actions, dbt Cloud CI)
  • Testing and documentation practices

Output Artifact

dbt project configuration, model SQL, macro definitions, metric definitions, data model documentation, and analytical query patterns.

Response Format

-- dbt model code
-- Analytical SQL queries
-- dbt project config, schema.yml, metrics definitions
-- Python dbt models
-- MetricFlow config

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • dbt project initialized with folder structure (staging, intermediate, marts)
  • Source definitions and staging models for all raw data
  • Intermediate models for business logic and transformations
  • Mart models for consumption (dimension, fact, aggregate tables)
  • Metrics defined and exposed via semantic layer
  • Tests defined for critical columns (unique, not_null, relationships)
  • Documentation generated with dbt docs
  • Analytical SQL queries for common analytics patterns

Max Response Length

400 lines of code and configuration.

Workflow

Step 1: dbt Project Structure

analytics/
├── models/
│   ├── staging/          # Raw → clean, typed, renamed
│   │   ├── stg_orders.sql
│   │   └── sources.yml
│   ├── intermediate/     # Business logic, joins, aggregations
│   │   ├── int_order_items.sql
│   │   └── int_customer_orders.sql
│   └── marts/            # Consumption-ready
│       ├── fct_orders.sql
│       ├── dim_customers.sql
│       └── marketing/
│           └── rpt_daily_revenue.sql
├── tests/                # Singular tests
│   └── assert_positive_revenue.sql
├── macros/               # Jinja macros
│   └── grant_permissions.sql
├── analyses/             # Ad-hoc queries
├── snapshots/            # Type-2 slowly changing dimensions
├── seeds/                # Static CSV data
└── dbt_project.yml

Step 2: Source and Staging

# models/staging/sources.yml
version: 2
sources:
  - name: raw_shop
    database: raw_db
    schema: public
    tables:
      - name: orders
        loaded_at_field: created_at
        freshness:
          warn_after: { count: 6, period: hour }
          error_after: { count: 12, period: hour }
      - name: customers
      - name: products
-- models/staging/stg_orders.sql
WITH source AS (
    SELECT * FROM {{ source('raw_shop', 'orders') }}
),
renamed AS (
    SELECT
        id AS order_id,
        customer_id,
        order_date::DATE AS order_date,
        status,
        total_amount::DECIMAL(10,2) AS total_amount,
        created_at,
        updated_at
    FROM source
    WHERE id IS NOT NULL
)
SELECT * FROM renamed

Step 3: Intermediate Models

-- models/intermediate/int_customer_orders.sql
WITH customer_orders AS (
    SELECT
        customer_id,
        MIN(order_date) AS first_order_date,
        MAX(order_date) AS most_recent_order_date,
        COUNT(order_id) AS number_of_orders,
        SUM(total_amount) AS lifetime_value
    FROM {{ ref('stg_orders') }}
    WHERE status != 'cancelled'
    GROUP BY 1
)
SELECT * FROM customer_orders

Step 4: Marts — Dimensional Model

-- models/marts/dim_customers.sql
WITH customers AS (
    SELECT * FROM {{ ref('stg_customers') }}
),
customer_orders AS (
    SELECT * FROM {{ ref('int_customer_orders') }}
)
SELECT
    customers.customer_id,
    customers.first_name,
    customers.last_name,
    customers.email,
    customer_orders.first_order_date,
    customer_orders.most_recent_order_date,
    COALESCE(
Полный SKILL.md на GitHub

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

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

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

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

  • references/data-modeling.md
  • references/data-quality-testing.md
  • references/data-warehouse-architecture.md
  • references/dbt-core.md
  • references/metrics-layer.md
  • references/sql-analytics.md

FAQ

Что делает скилл data-science-analytics-engineering?

Use when the user asks about analytics engineering with dbt: staging/intermediate/mart models, materializations, incremental models, Jinja macros, the dbt Semantic Layer / MetricFlow, Cube or analytical SQL. Produces dbt project layout, models, tests and metrics. Not for Kimball grain and SCD design (use data-dimensional-modeling) or Airflow wiring (use data-airflow-dbt-orchestration).

Как установить скилл data-science-analytics-engineering?

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

Скилл data-science-analytics-engineering запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить data-science-analytics-engineering с