Tim Enders
06/22/2021, 6:29 PMcontext
exists, but I am looking for something that can read a file and set the state. I don't think the context object is setup for that. It seems to be more runtime to meKevin Kho
Tim Enders
06/22/2021, 6:33 PMTim Enders
06/22/2021, 6:33 PMKevin Kho
Tim Enders
06/22/2021, 6:37 PMTim Enders
06/22/2021, 6:38 PMKevin Kho
Tim Enders
06/22/2021, 6:45 PMKevin Kho
Tim Enders
06/22/2021, 6:49 PMKevin Kho
Kevin Kho
Tim Enders
06/22/2021, 6:51 PMKevin Kho
pd.read_json
or however).Kevin Kho
Tim Enders
06/22/2021, 6:55 PMTim Enders
06/22/2021, 6:56 PMKevin Kho
case
task for if-else for exampleTim Enders
06/22/2021, 6:57 PMTim Enders
06/22/2021, 6:58 PMcontext
?Kevin Kho
Tim Enders
06/22/2021, 7:01 PMKevin Kho
Tim Enders
06/22/2021, 7:03 PMTim Enders
06/22/2021, 7:04 PMKevin Kho
Tim Enders
06/22/2021, 7:13 PMTim Enders
06/22/2021, 7:13 PMKevin Kho
Tim Enders
06/22/2021, 7:17 PMKevin Kho
Tim Enders
06/22/2021, 7:17 PM--help
page letting me pass in a configurationKevin Kho
def create_flow(flow_name, file_path):
config = read_file(file_path)
with Flow(flow_name) as flow:
env = Parameter('env', config['env'])
shell_task(command="dbt run", env={'ENV': config['env']})
return flow
flow = create_flow()
flow.register()
Tim Enders
06/22/2021, 7:19 PMTim Enders
06/22/2021, 7:19 PMKevin Kho
Tim Enders
06/22/2021, 7:25 PMconfig = read_config()
) I could then pass config['key']
to another task?Tim Enders
06/22/2021, 7:25 PMKevin Kho
config
and then inside the task use config['key']
Tim Enders
06/22/2021, 7:26 PMTim Enders
06/22/2021, 7:28 PMKevin Kho
def create_flow(flow_name, file_path):
config = read_file(file_path)
with Flow(flow_name) as flow:
env = Parameter('env', config['env'])
shell_task(command="dbt run", env={'ENV': config['env']})
return flow
flow = create_flow()
with flow:
# more edits here
flow.register()
Kevin Kho
Tim Enders
06/22/2021, 7:53 PMKevin Kho
Tim Enders
06/22/2021, 7:56 PM