Overview
Thedagster create command compiles your Metaflow flow into a self-contained Dagster definitions file. Each Metaflow step becomes a Dagster @op, and the flow’s DAG structure is preserved as a Dagster @job.
Command Syntax
Arguments
Path to write the generated Dagster definitions file. If not specified, defaults to
<job_name>_dagster.py (lowercased).Options
Dagster job name. Defaults to the flow name. If the flow uses
@project(name=...), the job name is automatically prefixed with the project name (e.g., myproject_FlowName).Inject a Metaflow step decorator at deploy time. Can be specified multiple times. Examples:
--with=sandbox or --with='resources:cpu=4,memory=8000'.Maximum wall-clock seconds for the entire job run. The job will be terminated if it exceeds this duration.
Tag all objects produced by Dagster job runs with this tag. Can be specified multiple times. Tags are forwarded to every
metaflow step subprocess.Metaflow namespace for the production run. Sets the namespace for all steps executed by the Dagster job.
Examples
Basic Usage
Generate a Dagster definitions file with default settings:Custom Job Name
Specify a custom name for the Dagster job:Inject Step Decorators
Add step decorators at deploy time without modifying the flow source:Set Workflow Timeout
Cap the total execution time for the entire job:Add Tags
Tag all runs for tracking and organization:Complete Example
Combine multiple options for production deployment:Output
On success, the command writes the generated Dagster definitions file and displays:Generated File Contents
The generated definitions file includes:- One
@opfor each Metaflow step - A
@jobthat preserves the flow’s DAG structure - Proper handling of splits, joins, and foreach branches
RetryPolicyfor steps with@retrydecorator- Execution timeouts for steps with
@timeoutdecorator ScheduleDefinitionif the flow has@scheduledecoratorSensorDefinitionfor@triggerand@trigger_on_finishdecorators- Typed
Configclass for MetaflowParameterdefinitions - Environment variables from
@environmentdecorators
Next Steps
Launch a Run
Trigger a Dagster job execution from the CLI
Resume Failed Runs
Resume a failed run and skip completed steps