Agent skill · mindrally
snowflake-snowpark-dbt
Best practices for Snowpark Python (DataFrames, UDFs, UDTFs, stored procedures) and dbt with the dbt-snowflake adapter. Use when writing server-side Snowpark pipelines, registering UDFs or stored procedures, choosing dbt materializations, configuring incremental models, or setting up sources and tests for a Snowflake-backed dbt project.
What it needs
About 5k tokens when loaded.
What this skill does
Snowflake Snowpark Python & dbt This skill covers building production data transformation pipelines with Snowpark Python (Snowflake's server-side Python API) and with dbt using the dbt-snowflake adapter. Workflow for a Snowpark or dbt Transformation 1. Snowpark: open a session — Build a Session from environment-scoped credentials, specifying role, warehouse, database, and schema explicitly. 2. Snowpark: express transforms with the DataFrame API — Prefer .filter(), .select(), .groupby().agg(), and .join() over raw SQL strings for reusable pipeline code; DataFrames are lazily evaluated and only execute on .collect()/.show()/a write action. 3. Snowpark: push compute server-side — Use scalar UDFs for row-wise logic, vectorized (pandas) UDFs for ML inference, UDTFs when one input row produces multiple output rows, and stored procedures for multi-step server-side orchestration. 4. dbt: model in layers — Staging models (stg) rename and type-cast; mart models express business logic on top of staging. 5. dbt: choose a materialization — view for cheap logic, table only when reads are frequent, incremental for large fact tables, dynamictable for near-real-time freshness needs. 6. dbt: define sources and tests — Declare sources in sources.yml with freshness thresholds; add unique/notnull tests on key columns. 7. dbt: run selectively — Use dbt run --select model+ (model and downstream) or +model (model and upstream) instead of full-project runs during iteration. 8. dbt: build and validate — Run dbt build (run + test in dependency order) before merging, and dbt docs generate to keep documentation current. Snowpark Python Snowpark runs Python server-side inside a Snowflake warehouse — data never leaves Snowflake. Core abstractions: Session, DataFrame, UDF, UDTF, UDAF, and Stored Procedure. Session Never hardcode credentials — always read them from environment variables or a secrets manager. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills mindrally/snowflake-snowpark-dbt