Dagster compatibility guide
Use this skill when writing, reviewing, or migrating Dagster projects. Start by identifying the installed Dagster and integration-package versions, then apply only guidance relevant to those versions. Project manifests, runtime behavior, and tests take precedence when they disagree with compatibility guidance.
Reference index
| Reference | Topics |
| --- | --- |
| Assets and automation | Asset values, virtual assets, selections, partitions, checks, freshness, and declarative automation |
| Components and CLI | Components, state, templates, dg, scaffolding, deployment commands, and configuration |
| Data integrations | dbt, Airbyte, Fivetran, Databricks, BI tools, IO managers, and new packages |
| Operations and deployment | Coordinators, pools, executors, backfills, GraphQL, databases, daemons, and runtime support |
| Platform integrations | Kubernetes, Helm, ECS, Azure, Pipes, authentication, Teams, SCIM, and Airlift |
| Upgrades and API | Removed and renamed APIs, freshness migration, CLI replacement, lifecycle labels, and package changes |
Apply breaking changes first
Replace removed asset APIs
- Pass
AssetSpecobjects directly toDefinitions; do not call removedexternal_asset_from_specorexternal_assets_from_specshelpers. - Pass
depsas a sequence. For a single configured dependency, usedeps=[AssetDep("upstream")]. - Replace
Definitions.get_all_asset_specs()withDefinitions.resolve_all_asset_specs(). - Use
include_external_assets, not the oldinclude_sourceskeyword, inAssetSelectioncalls.
Finish the freshness migration
- Import
FreshnessPolicyandapply_freshness_policyfrom top-leveldagster. - Replace legacy freshness and observation parameters with
automation_conditionplus schedule- or sensor-based automation. - Do not call the superseded
build_.*_freshness_checkshelpers or translatorget_freshness_policymethods. - Remember that the
FreshnessDaemonevaluates policies by default. Setfreshness.enabled: falseindagster.yamlonly when that evaluation is intentionally disabled.
Update Component loading
- Load a definitions folder with
load_from_defs_folder(path)instead of the deprecated, non-publicload_defs. - Use
context.load_component(...)andcontext.build_defs(...). Their*_at_pathcompatibility methods were removed in the 1.13 upgrade. - Put integration Component post-processors in top-level
post_processors. For Sling, passconnectionsdirectly rather thanslingorresource.
Replace removed commands
- Create a project with
create-dagster project; alldagster projectcommands are gone. - Use
dg utils integrationswhere older code useddg docs integrations, but note thatdg utils integrationsitself is removed in 1.13. - Replace
dagster-cloud ci checkwithdg plus deploy start. - Ensure Python is at least 3.10; Python 3.9 support was dropped in 1.12.
Repair integration migrations
- Replace
AirbyteStatewithAirbyteJobStatusTypeand remove legacy freshness arguments frombuild_airbyte_assets(). - Load Looker, Power BI, and Sigma specs through their
load_*_asset_specsfunctions, pass translator instances, and constructDefinitionsfrom the returned specs. - Declare
psycopg2-binarydirectly if a PostgreSQL deployment requires it;dagster-postgresno longer installs it transitively. - Run
dagster instance migratefor the MySQLLongTextmigrations.
Account for changed defaults
Run launch and concurrency
The queued run coordinator is the default. A running Dagster daemon is
therefore required to launch runs. To preserve immediate in-process launching,
configure SyncInMemoryRunCoordinator explicitly:
run_coordinator:
module: dagster.core.run_coordinator.sync_in_memory_run_coordinator
class: SyncInMemoryRunCoordinator
Concurrency blocking is also on by default. Under op granularity, a run can be dequeued when one op has capacity; under run granularity, every pool used by the run needs a free slot. Current pool names may contain any non-whitespace character, so do not preserve the older alphanumeric-only validator.
Configuration and persisted state
- Partial run config is merged with job-level defaults for omitted fields.
- State-backed integration Components default to
LOCAL_FILESYSTEMstorage, not legacy code-server snapshots. Configure storage explicitly when local files are unsuitable. DagsterDbtTranslatorSettings.enable_source_metadatadefaults toTrue, which can remap upstream keys from dbt source table names.- Date-looking YAML strings remain strings instead of becoming datetimes.
Storage and checks
- The SQLite event-log
busy_timeoutdefault is 30 seconds. - BigQuery, Snowflake, and DuckDB IO managers skip empty-DataFrame writes and warn rather than inferring a degenerate table.
- A missing result from a blocking asset check now warns and allows downstream assets to proceed; an explicitly failed result still fails the step.
Use current asset patterns
Return and load asset values
MaterializeResult(value=...) sends the value through the asset IO manager and
supports MaterializeResult[T]. A dependent asset can dynamically load a
value through its context:
import dagster as dg
@dg.asset
def upstream() -> dg.MaterializeResult[int]:
return dg.MaterializeResult(value=42)
@dg.asset(deps=[upstream])
def downstream(context: dg.AssetExecutionContext):
return context.load_asset_value(dg.AssetKey("upstream"))
Model virtual assets
Use preview is_virtual=True on @asset or AssetSpec for views and derived
tables whose state follows upstream changes without explicit materialization.
Virtual assets participate in staleness, planning, and declarative automation.
Select assets consistently
Selection expressions combine Boolean logic, lineage traversal, and attribute
filters across Components YAML and the UI. Newer selectors include sensor:,
schedule:, job:, automation_type:, and is:. Group names may contain
/, and group:"marketing/*" selects nested groups.
Use partition-aware checks and context
- Give
@asset_checkorAssetCheckSpecapartitions_defmatching the target asset. - Read
multi_partition_keyfrom op, asset, or asset-check execution context in a multi-partition run. - Use time-window partition
exclusionsfor custom calendars. - Filter selections by partition type, such as
partitions:"static".
Automate assets and jobs
- Use
AutomationCondition.data_version_changed()for data-version changes. - Use
all_new_updates_have_run_tags(),any_new_update_has_run_tags(), orall_new_executed_with_tags()when decisions depend on tags across new updates. - Use
freshness_passed(),freshness_warned(), andfreshness_failed()to branch on the most recent freshness evaluation. - In 1.13.16, preview job automation accepts an
automation_conditionondefine_asset_job; wrap asset conditions withany_job_root_assets_match()orall_job_root_assets_match().
Prefer current Component and CLI workflows
For new projects, define Components in defs.yaml or as typed Python
Component subclasses. Expose template helpers with @template_var, and use
load_component_at_path or build_defs_at_path only when maintaining code on
the older 1.11 surface.
Use the stable dg command groups for routine work:
dg scaffoldfor definitions and deployment artifacts.dg devfor local UI startup.dg launchfor launches.dg listanddg apifor definition and deployment metadata.dg checkfor project validation.dg plusfor Dagster+ login, configuration, environment, and deployment.
State-backed Components separate discovery state from YAML or Python config. Treat state refresh as a deployment step; generated GitHub Actions workflows do this for integrations that use the state-backed model.
Operate safely
- Follow GraphQL cursors:
logsForRunandeventConnectionreturn at most 1,000 events by default. - Expect event error fields above 500 KB to be truncated unless
DAGSTER_EVENT_ERROR_FIELD_SIZE_LIMITis set. - Custom process executors must emit, register, and handle a failure-or-retry event after resource initialization failure, or the run can remain started.
- Schedule, sensor, and asset daemons distribute instigator ticks round-robin across code locations.
- Use
DAGSTER_MAX_BACKFILL_RETRIES; the former asset-specific variable is accepted only as a fallback.
Verify a migration
- Confirm the core and integration package versions from the environment.
- Search for the removed names in the upgrade reference.
- Validate definitions with
dg checkand the applicable definition-querying commands. - Exercise asset selections, partition mappings, checks, and job defaults.
- Start the daemon when using the queued coordinator or freshness evaluation.
- Test database migrations, state storage, and deployment-specific overrides before rollout.
- Paginate GraphQL log consumers and confirm retry behavior for custom executors and external integrations.