Shameel Faraz
02/17/2023, 4:17 PMdef run_query_op_factory(job_name,table):
@op(name=job_name)
def _run_query(context):
fd = open(f'batch/batch_tables/query_{table}.sql', 'r')
sqlFile = fd.read()
fd.close()
params = (context.op_config["since_date"],)
data = wms.execute_query(sqlFile, params)
return data
return _run_query
In the schedular I tried dynamically creating the config, but it is not showing up.owen
02/17/2023, 6:27 PMconfig_schema={"since_date": str}
when creating your op. from there, you can pass in run_config when creating a RunRequest in your sensor i.e. yield RunRequest(..., run_config={"since_date": "2023-01-01"})