Components
Using Components
- @dagster.component_instance [source]
- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
Decorator for a function to be used to load an instance of a Component. This is used when instantiating components in python instead of via yaml.
class
dagster.ComponentLoadContext [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
Context available when instantiating Components.
Building Components
class
dagster.Component [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
Components are a tool for dynamically creating Dagster definitions. A Component subclass must implement the build_defs method. It may also inherit from Resolvable or implement get_model_cls to support instantiation via yaml.
class
dagster.Resolvable [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
This base class makes something able to “resolve” from yaml.
This is done by:
- Deriving a pydantic model to provide as schema for the yaml.
- Resolving an instance of the class by recursing over an instance of the derived model loaded from schema compliant yaml and evaluating any template strings.
The fields/init arguments of the class can be Annotated with Resolver to customize the resolution or model derivation.
class
dagster.ResolutionContext [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
The context available to Resolver functions when “resolving” from yaml in to a Resolvable object.
class
dagster.Resolver [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
Contains information on how to resolve a field from a model.
class
dagster.Model [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
pydantic BaseModel configured to disallow extra fields in order to help catch errors earlier.
Core Models
These Annotated TypeAliases can be used when defining custom Components for common Dagster types.
- dagster.ResolvedAssetKey
:
Annotated[
AssetKey,
...``]
Allows resolving to an AssetKey via a YAML-friendly schema.
- dagster.ResolvedAssetSpec
:
Annotated[
AssetSpec,
...``]
Allows resolving to an AssetSpec via a YAML-friendly schema.
- dagster.AssetAttributesModel
A pydantic modeling of all the attributes of an AssetSpec that can be set before the definition is created.
- dagster.ResolvedAssetCheckSpec
:
Annotated[
AssetCheckSpec,
...``]
Allows resolving to an AssetCheckSpec via a YAML-friendly schema.
class
dagster.AssetPostProcessorModel [source]- preview
This API is currently in preview, and may have breaking changes in patch version releases. This API is not considered ready for production use.
An object that defines asset transforms to be done via Definitions.map_asset_specs.