← ClaudeAtlas

building-dagster-assetslisted

Build Dagster pipelines using software-defined assets — asset dependencies, partitions, resources and IO managers, asset checks, and schedules/sensors. Use when creating Dagster assets or jobs, modeling data as assets, adding partitions or backfills, wiring resources/IO managers, or migrating from task-based orchestration to assets.
Unknown-333/awesome-data-engineering-skills · ★ 16 · AI & Automation · score 68
Install: claude install-skill Unknown-333/awesome-data-engineering-skills
# Building Dagster Assets ## When to use - Creating or refactoring Dagster software-defined assets and jobs. - Modeling tables/files/ML models as assets with lineage. - Adding partitions, backfills, asset checks, schedules, or sensors. - Do NOT use for Airflow (use the Airflow skills). ## Workflow ``` - [ ] Model each output as an @asset; declare deps via function args - [ ] Add partitions for time/category-sliced data - [ ] Move IO (reads/writes) into IO managers or resources - [ ] Add asset checks for data quality - [ ] Schedule/sensor to materialize ``` 1. **Think in assets, not tasks.** An asset is a persistent object (a table, file, model). Declare dependencies by referencing upstream assets as function parameters — Dagster builds the lineage graph automatically. 2. **Partition** assets that are naturally sliced (by day, region) so you can materialize/backfill one slice at a time. 3. **Resources and IO managers** hold connections and read/write logic, keeping asset bodies focused on transformation and making them testable. 4. **Asset checks** attach data quality assertions to an asset. ## Patterns **Partitioned assets with a dependency:** ```python import dagster as dg daily = dg.DailyPartitionsDefinition(start_date="2026-01-01") @dg.asset(partitions_def=daily) def raw_orders(context: dg.AssetExecutionContext) -> None: day = context.partition_key write_parquet(f"raw/orders/{day}.parquet", fetch_orders(day)) @dg.asset(partitions_def=daily) d