Combiz Khozoie
05/31/2023, 10:24 AMAssetsDefinition.from_op()
twice. I need the op to process the received input slightly differently depending on a parameter. In the example below, what's the best way to pass a parameter to the label_target
op to control its internal logic?
labelled_brw = AssetsDefinition.from_op(
label_target,
keys_by_input_name={"df": AssetKey("merge_raw_p_attrition")},
keys_by_output_name={"result": AssetKey("labelled_brw")},
group_name="preprocessing",
)
labelled_tul = AssetsDefinition.from_op(
label_target,
keys_by_input_name={"df": AssetKey("merge_raw_tul_cais")},
keys_by_output_name={"result": AssetKey("labelled_tul")},
group_name="preprocessing_tul",
)
Update: I created the logic using the result_asset
value from result_asset = context.asset_key_for_output("result").to_string()
in the op. Works well though not sure it's the best/dagster approach.claire
05/31/2023, 6:09 PMCombiz Khozoie
06/01/2023, 9:03 AMAssetsDefinition.from_op
claire
06/01/2023, 5:44 PMRunRequests
in a schedule or sensor, you can specify config on the RunRequest