Introducing a new way to review your PRs.

Read the announcement

dagster-io / dagster

An orchestration platform for the development, production, and observation of data assets.

View on GitHub

19 documents · Updated Nov 23, 2026

docs / software-defined-assets

Software-defined assets

Software-defined assets are named data products with declared inputs, rules, and ownership. Dagster uses these definitions to build a view of data dependencies, choose work for a run, materialize values, check their quality, and record metadata for lineage and operations. This page is a child of Definitions and automation; see Ops, jobs, and graphs for compute composition and Schedules, sensors, and automation for run triggers.

Asset model

Asset definitions

An asset definition describes a data asset and the work that can create or observe it. The asset has an AssetKey, which is its stable identity, a compute or observation action, and declared upstream dependencies. The definition can also state how the asset is grouped, partitioned, owned, tagged, versioned, and automated.

An asset key is a path of name parts. The path gives the asset a stable name across definitions and runs. One asset definition can describe one asset or several assets produced by one computation. It can also include checks that run with those assets.

The main asset modes are:

ModeSystem meaning
MaterializableDagster can run the definition to create or update the asset.
ObservableDagster can inspect an asset managed outside Dagster and record what it finds.
Unexecutable or externalDagster tracks the asset for dependency and lineage purposes but does not create it.

These modes let one graph include data managed by Dagster and data managed by other systems. A source asset can feed a materializable asset without claiming ownership of the source write step. When a selected executable definition is narrowed to a subset, its can_subset setting states whether the computation can run only the selected assets. This setting matters only for work that runs. Unexecutable external assets can retain different partition definitions because no computation subsets them.

References: python_modules/…/assets_definition.py• L87-116 python_modules/…/assets_definition.py• L292-365 python_modules/…/assets_definition.py• L1157-1177

Asset metadata

Asset metadata is the descriptive model attached to an asset definition. It tells people and automation what the asset represents without changing its data value. The model supports descriptions, groups, owners, tags, kinds, code versions, partitions, freshness rules, and automation conditions.

Static metadata describes the asset as a product. Event metadata describes one observation, materialization, or check result. Keeping these roles separate lets the graph show stable context while event records show what happened for a run or partition.

References: python_modules/…/assets_definition.py• L292-341 python_modules/…/assets_definition.py• L1094-1112 python_modules/…/__init__.py• L85-103

Asset graph

Dependency graph

The asset graph is the system view of asset definitions after their keys and dependencies are resolved. Each asset node points to upstream and downstream asset keys. The graph also carries asset checks and asset-job nodes so selection and automation can reason about related entities.

The graph makes data lineage explicit. A downstream asset can be planned only after the system understands which upstream assets it needs. Missing definitions for referenced assets become tracked external or stub assets. This preserves the dependency shape without making those assets executable.

The system builds a repository-level graph first. It then merges graphs from all repositories in the workspace into one view. A workspace asset node can represent the same key in several repositories while repository-scoped data keeps the source of each definition available. The merged view combines dependency and check links. It warns when more than one materializable or observable definition claims the same key.

This diagram shows how definitions become a graph and then a run plan.

flowchart LR
    D[Asset definitions] --> R[Repository asset graphs]
    R --> W[Workspace asset graph]
    W --> S[Asset and check selection]
    S --> J[Asset job]
    J --> M[Materialization or observation]
    M --> E[Events and metadata]
    E --> W

References: python_modules/…/assets_definition.py• L852-860 python_modules/…/asset_graph.py• L181-234 python_modules/…/remote_asset_graph.py• L706-807

Asset partitions

Partitions divide one logical asset into named slices. A partition definition belongs to the asset model. A partition mapping explains which upstream slices support a downstream slice. This lets the graph express time, region, or other data boundaries without treating each slice as a separate asset key.

Partition information affects planning and checks. A selected run can target a subset of partitions. A check can use the same partition model as its target asset. An executable multi-asset with different partition definitions must support subsetting. An unexecutable external asset does not need that setting because it never runs; it can preserve heterogeneous partition definitions as graph context.

References: python_modules/…/assets_definition.py• L344-365 python_modules/…/assets_definition.py• L1068-1092 python_modules/…/assets_definition.py• L1114-1194 python_modules/…/asset_spec.py• L109-156

Asset checks

Check definitions

An asset check is a named test for one target asset. Its definition states what the check is about, which other assets it needs, whether failure can block downstream work, and when it should run. A check has its own identity made from the target asset key and check name.

Checks can run with asset computation or as a separate check computation. This keeps data production and data quality as related graph entities while allowing different schedules, resources, or selection rules. A definition can select asset keys and check keys together, so work that must run together stays together.

References: python_modules/…/assets_definition.py• L146-148 python_modules/…/assets_definition.py• L679-703 python_modules/…/assets_definition.py• L940-969 python_modules/…/asset_check_spec.py• L58-96

Check evaluations

An evaluation records whether a check passed and can include a severity, description, and metadata. A warning reports a possible issue. An error reports a definite issue. Severity alone does not stop asset work. The check must also be marked as blocking for a failed error result to gate downstream assets.

The evaluation is matched to the check definition and target asset. For partitioned assets, it can be tied to the partition's materialization so quality status follows the same data slice as the asset.

References: python_modules/…/asset_check_result.py• L28-83 python_modules/…/asset_check_spec.py• L33-46 python_modules/…/assets_definition.py• L1121-1154

Materialization lifecycle

Materialization

Materialization is the recorded act of creating an asset value for a key and, when relevant, a partition. The asset definition supplies the work and its declared inputs. The storage boundary controls how the value is stored and later loaded by dependent assets. The event log records the materialization for lineage and status views.

An asset may be conditionally skippable. When no value is produced, downstream work that needs that value does not proceed for that path. The materialization event is therefore the key signal that data is available for later steps.

References: python_modules/…/assets_definition.py• L301-315 python_modules/…/assets_definition.py• L831-848 python_modules/…/events.py• L474-508

Asset observation

Observation records facts about an asset that Dagster does not update. An observable source asset can report metadata or a data version. The system uses that event to track change and support automation without treating the external asset as a Dagster-owned materialization.

Observation and materialization share the asset key and event metadata model. Their difference is ownership of the write action: observation reports an external state, while materialization records a Dagster-managed creation step.

References: python_modules/…/assets_definition.py• L1157-1177 python_modules/…/events.py• L378-433 python_modules/…/source_asset.py• L66-180

Asset selection

Selection queries

An asset selection is a query over the graph. It turns a human or automation target into a set of asset keys and related check keys. Selections can use keys, groups, tags, kinds, or graph relationships. They can also combine with union, intersection, and difference operators.

Graph-aware selection matters because a target is often larger than one key. Upstream selection adds required inputs. Downstream selection follows impact. Root and sink selection narrow a subgraph to its entry or exit points. By default, selecting an asset also selects checks that target it.

References: python_modules/…/asset_selection.py• L66-105 python_modules/…/asset_selection.py• L345-453 python_modules/…/asset_selection.py• L487-525

Asset job scope

An asset job is the executable scope created from a selection. The selected materializable assets become the work of the job. Unselected dependencies remain visible as unexecutable context. This keeps the correct lineage without trying to update those assets.

The selection is resolved when project definitions load. A selection of regular assets creates materialization work. A selection of source assets creates observation work. These purposes cannot be mixed in one selection. Assets and checks that share an execution set are planned together when the selected work includes them.

References: python_modules/…/unresolved_asset_job_definition.py• L266-302 python_modules/…/asset_job.py• L82-112 python_modules/…/asset_job.py• L233-247 python_modules/…/assets_definition.py• L1373-1399

Metadata and events

Static metadata

Static metadata is a key-value description attached to an asset or check definition. It gives the graph stable context such as a business description, an external table identity, or ownership data. The model accepts common scalar and structured values and normalizes them to Dagster metadata values for display and storage.

Static metadata is not a substitute for a dependency. Use asset keys and dependencies to describe data flow. Use metadata to describe the asset and help people or tools interpret it. Table metadata can also connect asset keys that point to the same storage address. This supports a shared view of data with more than one logical definition.

References: python_modules/…/assets_definition.py• L1094-1112 python_modules/…/__init__.py• L85-176 python_modules/…/asset_spec.py• L116-142 python_modules/…/remote_asset_graph.py• L610-651

Event metadata

Event metadata is attached to one materialization, observation, or check result. It can describe the output produced in that event, the partition affected, or the evidence behind a check. The system normalizes these values before recording them so that UI and storage tools use one common shape.

This two-level model links durable asset meaning with run-specific evidence. Asset definitions support planning and discovery. Events support history, lineage, quality status, and operational review.

References: python_modules/…/events.py• L378-433 python_modules/…/events.py• L474-555 python_modules/…/asset_check_result.py• L43-83

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to asset keys or dependency declarations affect graph lineage, selection results, job scope, and stored event identity.
  • Changes to partition definitions or mappings affect materialization targets, asset checks, and asset-job partition context. For executable multi-assets, different partition definitions still require subsetting support. Unexecutable external assets are exempt because they do not run.
  • Changes to check names or target assets change AssetCheckKey identity and can disconnect stored evaluations from their definitions.
  • Changes to materialization mode affect whether a job may execute the asset, observe it, or keep it only as graph context.
  • Changes to metadata value types must preserve the normalization and serialization contract shared by definitions and events.
  • Changes to blocking check behavior must be reviewed with downstream execution planning because a failed error result can gate dependent assets.
  • Changes to definitions in more than one code location must preserve the one-materializable and one-observable definition rule for each asset key.
  • Changes to job names or job automation conditions must account for same-named jobs across code locations because one condition can replace another in the workspace view.

Important failure modes

TriggerConsequenceGuard
A dependency key has no definitionThe graph tracks it as external context, so a job does not create it.Define the asset when Dagster owns its creation, or keep the external status intentional.
More than one materializable or observable definition uses one asset keyThe workspace graph warns about the duplicate, and the key has an ambiguous executable owner.Keep at most one definition of each executable type for an asset key.
An executable multi-asset has different partition definitions but does not support subsettingDefinition validation fails because one computation cannot safely run the selected partitioned outputs.Set subsetting support when the executable definition can run selected outputs. External unexecutable assets do not need this setting.
A job selection mixes source assets with regular assetsThe selection cannot resolve to one execution purpose.Use one observation selection or one materialization selection.
A check result does not match a selected check definitionThe result cannot be linked to the expected asset check.Keep the target asset and check name aligned with the check spec.
A blocking check returns an error resultDownstream assets that depend on the checked asset do not execute.Mark a check as blocking only when its failure should gate data flow.
A partitioned check uses a partition model different from its assetThe check cannot align its result with the asset slice.Use the target asset's partition definition for the check.
Metadata contains an unsupported valueDefinition or event creation fails during metadata normalization.Use supported scalar, JSON, path, asset, table, or explicit MetadataValue forms.
The same job name has automation conditions in multiple code locationsOne condition wins in the merged workspace view, so the other condition is not used.Give jobs unique names across code locations or keep one authoritative condition.

Key files

FileWhy to read it
python_modules/…/assets_definition.pyCentral model for asset identity, dependencies, checks, partitions, execution mode, subsetting, and asset metadata.
python_modules/…/asset_decorator.pyPublic model for defining materializable assets and their high-level attributes.
python_modules/…/asset_spec.pyCore asset identity and descriptive metadata model without computation details.
python_modules/…/asset_graph.pyConstruction of the resolved asset graph and its asset/check relationships.
python_modules/…/remote_asset_graph.pyRepository and workspace asset graph views, cross-repository merging, execution sets, and duplicate-key rules.
python_modules/…/asset_selection.pyGraph queries used to choose assets and checks for work.
python_modules/…/asset_check_spec.pyContract for naming and relating a check to an asset.
python_modules/…/asset_check_result.pyResult model for quality evaluations and their effect signals.
python_modules/…/events.pyMaterialization and observation records that connect asset work to history and metadata.
python_modules/…/__init__.pyShared metadata value model and normalization rules.
python_modules/…/asset_job.pyBoundary between graph selection and executable asset-job scope.