geoHeil
03/01/2022, 2:57 PMop
and asset
? Right now I get a: DagsterInvalidConfigError: Error in config for job
Error 1: Missing required config entry "dummy_asset_partitioned" at path root:ops. Sample config for missing entry: {'dummy_asset_partitioned': {'config': {'date': '...'}}}
as Dagster is feedng the configuration per-op and somehow is only filling the partition date into a single of the two steps@daily_partitioned_config(start_date=datetime(2022, 2, 1))
def my_partitioned_config(start: datetime, _end: datetime):
return {"ops": {"my_op": {"config": {"date": start.strftime("%Y-%m-%d")}}}}
Is it somehow possible to feed the partition globally? And not for each operation which is part of the graph materializing the asset?sandy
03/01/2022, 4:33 PMdaily_partitioned_config
decorator for software-defined assets. Instead, you attach a DailyPartitionsDefinition
to each asset. Inside the asset's compute function, you can directly access the partition from the context. E.g.
@asset(partitions_def=DailyPartitionsDefinition(start_date="2020-04-04")
def my_asset(context):
partition_key = context.output_asset_partition_key()
# alternatively...
start_dt, end_dt = context.output_asset_partitions_time_window()
geoHeil
03/01/2022, 4:36 PMDailyPartitionsDefinition
and daily_partitioned_config
when mixing ops and assets in a graph?sandy
03/01/2022, 4:37 PMgeoHeil
03/01/2022, 4:38 PM