Hi, a simple question for Prefect1.0,
I define a function (but not decorated with @task decorator). This function does a third party API call to return a list of dictionary.
Use case is this function will be called in
with Flow
block and the list it returns will be used in
create_flow_run.map(parameters=...)
, My question is when we deployed the flow (it runs every midnight), will the function we defined be called each time when Flow is scheduled to run?
n
Nate
08/04/2022, 6:30 PM
Hi @Chu, I think the short answer is yes
each time you run your flow, everything within the
with Flow(...) as flow:
block will be run, whether these are prefect tasks being run or regular python functions being called
does that answer your question?
c
Chu
08/04/2022, 6:46 PM
yes, even if the function is defined out side of the with Flow block right?
n
Nate
08/04/2022, 9:13 PM
yep! but becuase its not a task, it won't show up in the logs
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.