https://prefect.io logo
h

Henry

03/04/2022, 8:55 PM
is it bad practice to define a parameter in a module scope rather than in the flow context?
Copy code
input_a = Parameter('a')

@task 
def abc(b, c):
  return a + b + c

with Flow("abc_flow") as flow:
  # in context
  result = abc()
k

Kevin Kho

03/04/2022, 9:00 PM
Hi @Henry, this will run during build time as opposed to flow run time so you cant do this
h

Henry

03/04/2022, 10:42 PM
ah thanks
4 Views