Samuel Stütz
09/07/2022, 8:13 AMdagster._check.CheckError: Invariant failed. Description: Can't supply a ConfigMappi/ng for 'config' when 'partitions_def' is supplied.
However I have an @asset which has some configs so the underlying op can be easily reused as a template.
But it seems I cannot combine configs with partitions anymore or never tried.
Do I have to either partition or configure the asset?
I got op + config = asset which works
now I would like op + config + partition = partitioned asset ???Jon Simpson
09/07/2022, 3:46 PMyuhan
09/07/2022, 5:59 PMPartitionedConfig
helps in this case. You can do:
@op(config_schema={"date": str})
def my_op(_):
pass
@graph
def my_graph():
my_op()
def config_fn(partition: Partition):
return {"ops": {"my_op": {"config": {"date": partition.value}}}}
job = my_graph.to_job(
config=PartitionedConfig(
run_config_for_partition_fn=config_fn,
partitions_def=StaticPartitionsDefinition(["2020-02-25", "2020-02-26"]),
),
)
Dimitris Stafylarakis
09/28/2022, 7:22 AMgrpc_message:"Exception calling application: Can only serialize whitelisted namedtuples, received TimeWindow
)