https://prefect.io logo
f

FuETL

02/11/2022, 4:28 PM
Hey guys, is this setup possible? I already a have
Copy code
with Flow("dummy_flow") as flow:
   ... # parameters, logic, etc
I want to re-use this same flow (create another one), but reuse the logic of the previous one without have to copy-and-paste the old one is that possible? I want to create a second flow ex: "second_dummy_flow" but using the same logic of dummy_flow, so on prefect ui i will see 2 flows that will do the same thing
k

Kevin Kho

02/11/2022, 4:32 PM
I think you can try:
Copy code
with Flow("name1") as flow:
   ...

flow.register(..)

flow.name = "name2"
flow.register(..)
or try:
Copy code
with Flow("name1") as flow:
   ...

flow2 = flow
flow2.name = "name2"
I dont know it it will deepcopy or not
f

FuETL

02/11/2022, 4:36 PM
Thank you! I will test here!!
4 Views