Chris Nogradi
05/10/2023, 7:58 PMChris Nogradi
05/12/2023, 2:17 PMsean
05/12/2023, 6:46 PMrun_config
in the old format (directly loaded from YAML). This is unlikely to go away anytime soon because this is also how config needs to come in from non-Python APIs (CLI, dagit)Megan Beckett
06/05/2023, 10:03 AMDefinitions
using this new way? or, just leave them out and still be able to pass in a yaml file to run_config
in the RunRequest
in a schedule or sensor?Megan Beckett
06/05/2023, 10:04 AMChris Nogradi
06/21/2023, 3:54 PMdef make__sensor(sensor_job, tables_partitions_def, prefix=None, run_config=None) -> SensorDefinition:
name = tables_partitions_def.name.replace('-','_')
config = {"ops": {f'{name}': {"config": { "file_url": ""} } } }
if run_config:
config = deep_merge_dicts(config, run_config)
url_config = config['ops'][f'{name}']['config']
@sensor(job=sensor_job, name=f'{name}_sensor')
def sensor(context: SensorEvaluationContext,
sensor_resource: SensorResource):
...
run_requests = [RunRequest(... run_config=update_file_url(config, url_config,f'construct_url_w_{key}')) for key in keys]
...
return SensorResult(run_requests=run_requests, dynamic_partitions_requests=[tables_partitions_def.build_add_request(new_keys)])
return sensor