xiaohongshu
xiaohongshu
dbt-projects-on-snowflake
Deploy, manage, and monitor dbt projects natively within Snowflake using web-based workspaces, schema-level DBT PROJECT objects, and comprehensive event table telemetry.
Full skill instructions
Deploy, manage, and monitor dbt projects natively within Snowflake using web-based workspaces, schema-level DBT PROJECT objects, and comprehensive event table telemetry.
Three Ways to Use dbt Projects:
Complete setup instructions including prerequisites, external access integration, Git API
integration, and event table configuration are in references/SETUP.md.
# Deploy project
snow dbt deploy my_project --source .
# Execute commands
snow dbt execute my_project run
snow dbt execute my_project build
Execute directly in SQL:
EXECUTE DBT PROJECT <db>.<schema>.<project> args='build';
EXECUTE DBT PROJECT <db>.<schema>.<project> args='build --full-refresh';
EXECUTE DBT PROJECT <db>.<schema>.<project> args='build --select tag:gold';
For automated scheduling with Snowflake Tasks, see the "Optional: Schedule Automated Runs" section
in references/SETUP.md.
Configure event tables following the Event Table Monitoring Configuration section in
references/SETUP.md. This enables OpenTelemetry-based monitoring of dbt project executions.
All monitoring scripts use parameterized event table references. Specify your event table location when running:
# Example: Query recent executions
snow sql -f scripts/recent_executions.sql --enable-templating JINJA \
-D event_table=MY_DATABASE.MY_SCHEMA.EVENT_LOG
# Example: Check for errors
snow sql -f scripts/execution_errors.sql --enable-templating JINJA \
-D event_table=LOGS_DB.PUBLIC.DBT_EVENTS
# Example: Performance metrics
snow sql -f scripts/performance_metrics.sql --enable-templating JINJA \
-D event_table=MY_DATABASE.MY_SCHEMA.EVENT_LOG
Core Monitoring:
recent_executions.sql - Lists recent dbt project executions with severityexecution_errors.sql - Query ERROR logs to identify failuresperformance_metrics.sql - Query CPU and memory usage metricstrace_spans.sql - Query execution spans for timing analysisexecution_summary.sql - Summarize executions by project with error countsAdvanced Use Cases:
alert_failures.sql - Alert trigger for execution failures (returns error count)performance_regression.sql - Week-over-week performance comparisonresource_usage.sql - CPU and memory consumption by projectaudit_trail.sql - Complete execution audit trail for complianceEvent tables follow the OpenTelemetry data model with these key columns:
| Column | Description |
|---|---|
| TIMESTAMP | UTC timestamp when event was created (end of time span for span events) |
| START_TIMESTAMP | For span events, the start of the time span |
| TRACE | Tracing context with trace_id and span_id |
| RESOURCE_ATTRIBUTES | Source identification: database, schema, user, warehouse, etc. |
| SCOPE | Event scopes (e.g., class names for logs) |
| RECORD_TYPE | Event type: LOG, SPAN, SPAN_EVENT, EVENT, METRIC |
| RECORD | JSON object with record-specific data (severity, metric type, span details) |
| RECORD_ATTRIBUTES | Event metadata set by Snowflake or code |
| VALUE | Actual log message, metric value, or null for spans |
Performance Optimization:
Monitoring Strategy:
TIMESTAMP to avoid scanning large event tablessnow.executable.type = 'DBT_PROJECT' to isolate dbt eventsRESOURCE_ATTRIBUTES for filtering by project/database/schemaAlerting Priorities:
| Issue | Solution |
|---|---|
| No events captured | Verify event table set at DATABASE level with ALTER DATABASE |
| Too many events | Adjust LOG_LEVEL/TRACE_LEVEL/METRIC_LEVEL per schema |
| Slow monitoring queries | Always filter by TIMESTAMP first; consider archiving old data |
| Missing metrics | Set METRIC_LEVEL = 'ALL' for schema |
| Missing traces | Set TRACE_LEVEL = 'ALWAYS' for schema |
| Cannot see project name | Verify snow.executable.type = 'DBT_PROJECT' filter |
| Command | Workspaces | EXECUTE DBT PROJECT | snow dbt execute |
|---|---|---|---|
| build | ✅ | ✅ | ✅ |
| run | ✅ | ✅ | ✅ |
| test | ✅ | ✅ | ✅ |
| compile | ✅ | ✅ | ✅ |
| seed | ✅ | ✅ | ✅ |
| snapshot | ✅ | ✅ | ✅ |
| deps | ✅ (workspace only) | ❌ | ❌ |
Flexibility: Team members can use different development approaches simultaneously:
| Command | Purpose |
|---|---|
snow dbt deploy <name> | Deploy project to Snowflake |
snow dbt execute <name> run | Run dbt models |
snow dbt execute <name> build | Run and test models |
snow dbt execute <name> test | Run tests only |
snow dbt list | List all dbt projects |
For setup and deployment issues, see references/SETUP.md.
For monitoring issues, see the Troubleshooting table in the Event Table Monitoring section above.
Complementary Observability:
dbt-artifacts skill - For cross-platform execution logging and historical trend analysisWhen to use both together:
When to use one vs the other:
scripts/ - Ready-to-use parameterized SQL scripts for monitoring
recent_executions.sql, execution_errors.sql, performance_metrics.sql,
trace_spans.sql, execution_summary.sqlalert_failures.sql, performance_regression.sql, resource_usage.sql,
audit_trail.sqlreferences/SETUP.md - Complete step-by-step setup including event table
configuration and task schedulingxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience