sqlmesh
FreeNo executable scriptsNot checkedSQLMesh patterns for data transformation with column-level lineage and virtual environments. Use when building data pipelines that need advanced features like…
About this skill
SQLMesh Skill
This skill provides SQLMesh patterns for data transformation.
Project Structure
sqlmesh_project/
├── config.yaml
├── models/
│ ├── staging/
│ │ └── stg_customers.sql
│ └── marts/
│ └── dim_customers.sql
├── macros/
├── seeds/
├── audits/
└── tests/
Model Definition
-- models/staging/stg_customers.sql
MODEL (
name staging.stg_customers,
kind INCREMENTAL_BY_TIME_RANGE (
time_column created_at
),
cron '@daily'
);
SELECT
id AS customer_id,
LOWER(email) AS email,
created_at
FROM raw.customers
WHERE created_at BETWEEN @start_ds AND @end_ds
Model Kinds
| Kind | Use Case |
|---|---|
FULL |
Complete refresh each run |
INCREMENTAL_BY_TIME_RANGE |
Time-based incremental |
INCREMENTAL_BY_UNIQUE_KEY |
Key-based merge |
VIEW |
Virtual table |
SEED |
Static CSV data |
Virtual Environments
# Create a virtual environment for testing
sqlmesh plan dev
# Apply to production
sqlmesh plan prod
Audits
-- audits/no_nulls.sql
AUDIT (
name assert_no_null_customer_id,
model staging.stg_customers
);
SELECT * FROM staging.stg_customers
WHERE customer_id IS NULL
Best Practices
- Use column-level lineage for impact analysis
- Leverage virtual environments for testing
- Define audits for data quality
- Use incremental models for efficiency
Install sqlmesh in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the sqlmesh skill do?
SQLMesh patterns for data transformation with column-level lineage and virtual environments. Use when building data pipelines that need advanced features like automatic DAG inference and efficient incremental processing.
How do I install the sqlmesh skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the sqlmesh skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic