https://prefect.io logo
#prefect-community
Title
# prefect-community
p

Patrick Tan

06/06/2022, 8:01 PM
Hi, When I run flow from command line or UI, I can specify log level, Can I specify log level (eg DEBUG) from code like below?
Copy code
create_flow_run.map(
    flow_name=unmapped("LiveLots-ETL"),
    project_name=unmapped(f"{prefect_project}"),
    run_name=flowname_list,
    run_config=unmapped(LocalRun(labels=[prefect_label])),
    idempotency_key=idempotency_keys,
    parameters=filelist,
)
k

Kevin Kho

06/06/2022, 8:48 PM
You can do it through the
env
part of the RunConfig right?
👍 1
p

Patrick Tan

06/06/2022, 11:42 PM
I am trying to retrieve log_level from config file and assign it to environment variable. How do I reference return variable from a task to create_flow_run? Below does not work
Hi @Kevin Kho, do you know how to reference variable returned from task in create_flow_run?
k

Kevin Kho

06/07/2022, 8:49 PM
Oops sorry forgot to get back. Was a busy day. Looking now
I am wondering if this is caused by the dict but I am not entirely sure. Can you try making the whole env the output of a task and try passing it in?
Similarly you can try making the LocalRun an output of a task as well
3 Views