Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Dagster Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-dagster-knowledge-patch)
---
name: dagster-knowledge-patch
description: Dagster
version: "1.13.31"
license: MIT
metadata:
author: Nevaberry
---
# Dagster Knowledge Patch
Load this skill when migrating Dagster APIs, defining assets and automation,
working with components or `dg`, configuring execution and deployment, or
updating integrations. Use the topic references for complete guidance and examples.
| Reference | Topics |
| --- | --- |
| [Upgrade and compatibility](references/upgrade-and-compatibility.md) | Removed APIs, lifecycle changes, Python and dependency requirements |
| [Assets and automation](references/assets-and-automation.md) | Definitions, selections, values, freshness, checks, partitions, automation |
| [Components and CLI](references/components-and-cli.md) | Project setup, component loading, templates, state, deployment commands, MCP |
| [Execution and operations](references/execution-and-operations.md) | Queues, pools, resources, executors, backfills, sensors, GraphQL, alerts |
| [Deployment and storage](references/deployment-and-storage.md) | Storage migrations, I/O managers, Helm, Kubernetes, ECS, Serverless, identity |
| [Integrations](references/integrations.md) | dbt, Airbyte, Fivetran, dlt, Sling, BI, Pipes, Databricks, warehouses |
## Breaking changes and deprecations
Dagster 1.13.30 requires Python 3.11 or later. Dagster+ Serverless stops publishing
Python 3.10 base images; existing Python 3.10 PEX code locations continue running
on the last Python 3.10 base image. Dagster 1.9 requires `pydantic>=2`.
### Asset and resource APIs
- `external_asset_from_spec` and `external_assets_from_specs` were removed in
1.13. Pass specs directly to `Definitions`, or build an `AssetsDefinition` from
them when an asset definition object is needed.
- Wrap a single `AssetKey` passed to `deps` in a sequence. Use `AssetDep` for
dependencies needing configuration such as a partition mapping.
- `Definitions.get_all_asset_specs()` was removed in 1.13; use
`defs.resolve_all_asset_specs()` for resolved specs.
- `Definitions.map_asset_specs` dropped `selection` in 1.10.19; use
`Definitions.map_resolved_asset_specs` to transform a selection.
- Replace `include_sources` with `include_external_assets` in `AssetSelection`.
- Different `AssetSpec` objects with the same key warn from 1.10.18 and become an
error in 1.11. Make the key unique or supply a single spec.
- Use `context.run` on `InitResourceContext`; `context.dagster_run` is deprecated.
- Replace `@experimental` with `@preview` or `@beta`; the lifecycle also includes
`@superseded`, with corresponding annotations and warnings.
### Freshness and automation migrations
Replace imports from `dagster.preview.freshness` with top-level imports in 1.12:
```python
from dagster import FreshnessPolicy, apply_freshness_policy
```
Use `FreshnessPolicy` for new freshness definitions; `build_*_freshness_checks`
helpers are superseded. The `FreshnessDaemon` evaluates policies by default;
set this in `dagster.yaml` to disable it:
```yaml
freshness:
enabled: false
```
For legacy policies in 1.11, use `from dagster.deprecated import FreshnessPolicy`
and the applicable `legacy_freshness_policy=` or
`legacy_freshness_policies_by_output_name=` argument. The references detail the
affected APIs and the legacy arguments removed from definitions and loaders in 1.13.
`@observable_source_asset` no longer accepts `legacy_freshness_policy` or
`auto_observe_interval_minutes` in 1.13. Configure `automation_condition=` or use
a schedule or sensor. `DagsterDbtTranslator` and `DagsterSlingTranslator` removed
`get_freshness_policy` and automatic loading of legacy policies from integration
configuration in 1.12.
`AutoMaterializePolicy` and `AutoMaterializeRule` are deprecated. Replace
`auto_materialize_policy=` on `@asset` and `AssetSpec` with `automation_condition=`;
existing policies and new conditions can coexist during migration.
`@multi_asset_sensor` is deprecated for removal in 2.0; use `AutomationCondition`
for asset automation that can be expressed declaratively.
### Component and integration migrations
The standalone `dagster-components` package was folded into `dagster`. Import
from `dagster.components` or the top-level exports. Use `defs.yaml` for YAML
component instances, `load_from_defs_folder` with a folder path in place of
`load_defs`, and `@component_instance` in place of `@component`.
Use `ComponentLoadContext.build_defs` and `ComponentLoadContext.load_component`;
the `build_defs_at_path` and `load_component_at_path` aliases were removed in 1.13.
Component loading preserves the process working directory: use
`context.resolve_source_relative_path("config.yaml")` for adjacent files.
For `DbtProjectComponent`, replace `dbt` with `project` and `asset_attributes`
with `translation`; use `translation_settings` for translator configuration.
On `SlingReplicationCollectionComponent`, use `translation` in place of
`asset_attributes`. Move its or `AirflowInstanceComponent`'s
`asset_post_processors` to top-level `post_processors`.
Replace deprecated `FivetranResource` with `FivetranWorkspace`. Use
`AirbyteWorkspaceComponent` in place of `AirbyteCloudWorkspaceComponent`, and
`AirbyteJobStatusType` in place of the removed `AirbyteState`.
## Project and component quick reference
Add `dagster-dg-cli` to each existing project's dependencies. Remove the former
global installation with `uv tool uninstall dagster-dg` or
`pip uninstall dagster-dg`, according to how it was installed.
```sh
uvx create-dagster project my-project
uvx create-dagster workspace my-workspace
```
Place settings under `tool.dg` in `pyproject.toml`, or at the root of `dg.toml`.
Supported `dg` commands accept `--use-active-venv` for that invocation.
| Task | Command |
| --- | --- |
| Scaffold a component class | `dg scaffold component` |
| Scaffold definitions or an instance | `dg scaffold defs <scaffolder>` |
| Inspect the component hierarchy | `dg list component-tree` |
| Validate definitions or TOML | `dg check defs`, `dg check toml` |
| Generate deployment files | `dg scaffold build-artifacts` |
| Prepare existing projects for deployment | `dg plus deploy configure` |
| Launch through the Dagster+ API | `dg api run launch` |
`dg check defs` and `dg dev` run from a workspace's project directory target that
project. `dg list defs --assets <selection>` filters assets;
`dg list defs --path <path>` limits the displayed definition files.
The YAML `env` helper errors for unset variables. Supply a fallback for optional
variables, such as `{{ env('MY_ENV_VAR', 'default') }}`. Templates can access
`context.project_root`, `context.build_defs(...)`, `context.load_component(...)`,
and automation condition and partition definition constructors under `dg`.
State-backed integration components default to `LOCAL_FILESYSTEM` storage for
persisted metadata from 1.13.1. From 1.13.23, `defs.yml`, `dagster.yml`, and
`workspace.yml` are accepted; if both extensions exist, Dagster loads `.yaml`.
## Assets, checks, and automation quick reference
Pass `value` to `MaterializeResult` to invoke the asset's I/O manager, and annotate
with `MaterializeResult[T]`. Declare an upstream asset in `deps` and call
`AssetExecutionContext.load_asset_value` to load its value inside the asset.
Set `partitions_def` on `@asset_check` or `AssetCheckSpec` for a partition-aware
check, using the same partition definition as the target asset. A partitioned
check with its own automation condition can be requested on a tick that omits
materializing the checked asset.
`AssetCheckSpec(blocking=True)` can stop dependent work while the same step emits
independent materializations and check results. Return after emitting the failure
if the compute function itself should stop. From 1.13.6, downstream assets can
proceed if a blocking check emits no result; a failed blocking check fails the
step and run. A `skippable=True` asset that omits its output keeps downstream
steps skipped even if it emits a blocking check result.
Use `AutomationCondition.data_version_changed()` for data-version changes and
`AutomationCondition.executed_with_tags()` to filter updates by originating run
tags. `AutomationCondition.initial_evaluation()` resets for all partitions when
the asset's partitions definition changes, not when only its condition tree changes.
In preview, `define_asset_job(automation_condition=...)` launches a single job
run when its condition becomes true. Wrap asset-level conditions with
`AutomationCondition.any_job_root_assets_match(...)` or
`AutomationCondition.all_job_root_assets_match(...)`; evaluations appear on the
job's **Automation** tab.
Virtual assets are a preview: set `is_virtual=True` on `AssetSpec` or `@asset` to
model derived assets reflecting upstream changes without their own materialization.
The preview supports staleness calculations, execution planning, and automation.
## Execution and backfill quick reference
The queued run coordinator is the default and needs a running Dagster daemon.
Pool-aware run blocking is enabled by default: op granularity admits a run when
at least one op can start; run granularity requires available slots in every pool
the run uses. Pool names accept any non-whitespace characters from 1.12.15.
`AutomationConditionSensorDefinition` uses an asset's `BackfillPolicy` when a
tick requests multiple partitions of that asset. Set `allow_backfills=False` to retain
individual run requests, and use `target` in place of `asset_selection`.
Use Runs > Backfills for original-partition re-execution, or **Re-execute from
failure** to target failed partitions in a new backfill. **Enable retries from
asset failure** retries only failed or skipped assets when re-executing a run
that targeted a multi-asset. A non-subsettable multi-asset backfill requires all
its assets; a failing backfill cancels in-progress runs before terminating.
`DAGSTER_MAX_BACKFILL_RETRIES` controls transient-error retries for job and asset
backfills, falling back to `DAGSTER_MAX_ASSET_BACKFILL_RETRIES` if unset.
From 1.13.21, an asset backfill finishes failed when all runs have ended and any
targeted partitions still lack a materialization status.
For async `ConfigurableResource.yield_for_execution`, pass an `event_loop` to
the context builder during direct invocation. Mark secret resource fields with
`dagster__is_secret` to hide their values in the UI.
## Integration and operations quick reference
From `dagster-dbt` 0.29.26, install optional dbt Core with
`pip install 'dagster-dbt[dbt-core]'`; a Fusion executable on `PATH` is used directly.
From 0.29.28, `pip install 'dagster-dbt[dbt]'` installs Fusion v2 from PyPI.
The integration errors if `dbt` and `dbt-core` PyPI packages coexist because both
provide the `dbt` import namespace. Set `install_deps=False` on `DbtProject` or
`DagsterDbtProjectPreparer`, or `install_deps: false` in the component's `project`
configuration, to skip `dbt deps` when packages are installed separately.
dbt tests with `severity: error` are blocking asset checks. From 0.29.26,
`fetch_column_metadata()` and `fetch_row_counts()` warn and emit events without
the requested metadata on Fusion or when dbt adapter initialization fails.
Materializations include dbt status; no-op, reused, and warn emit materializations,
while `partial success` and `skipped` are treated as failures.
GraphQL `logsForRun` and `eventConnection` default to at most 1,000 entries;
use the response `cursor` for the next page. From 1.13.26, event-log, tick, and
run-record queries clamp oversized `limit` values to the server-side default.
Edit, disable, or delete YAML-managed Dagster+ alert policies in the file and sync
changes; UI muting remains available. Policies predating 1.13.21 require manual
UI deletion. Use `Runs in progress` in place of deprecated `Run concurrency`.
From 1.13.31, the `dagster` plugin ignores `DAGSTER_CLOUD_MCP_URL`. EU organizations
must register the EU MCP endpoint directly; see the MCP section of the CLI reference.