Customizing eager
tip
You can scaffold assets from the command line by running dg scaffold defs dagster.asset <path/to/asset_file.py>
. For more information, see the dg
CLI docs.
Ignoring missing upstream data
By default, AutomationCondition.eager()
will not materialize a target if it has any missing upstream data.
If it is expected to have missing upstream data, remove ~AutomationCondition.any_deps_missing()
from the eager policy to allow execution:
src/<project_name>/defs/assets.py
import dagster as dg
condition = (
dg.AutomationCondition.eager()
.without(~dg.AutomationCondition.any_deps_missing())
.with_label("eager_allow_missing")
)
Updating older time partitions
By default, AutomationCondition.eager()
will only update the latest time partition of an asset.
If updates to historical partitions should result in downstream updates, then this sub-condition can be removed:
src/<project_name>/defs/assets.py
import dagster as dg
condition = dg.AutomationCondition.eager().without(
dg.AutomationCondition.in_latest_time_window(),
)