Hi all, I have a general question about Prefect 1.0 vs 2.0. Is Prefect 1.0 not going to be supported much longer? I've been working with others on a project that hasn't been deployed yet and uses Prefect 1.0, and I'm wondering if we should not be spending much effort trying to implement it using 1.0. For instance, I was interested in using control flow "case" in 1.0 but am thinking this might conflict with the new case switcher in Python 3.10, and I don't see any use of "case" in 2.0. I realize this question is kind of vague, and any advice would be appreciated!
✅ 1
a
Anna Geller
09/01/2022, 4:08 PM
We will continue to support Prefect 1 through at least June 2023, so you have plenty of time to make the transition, but only Prefect 2 will continue to be improved and maintained in the long term.
Anna Geller
09/01/2022, 4:10 PM
For the control flow: it's already fully supported as you can run any Python if/else code in your flows, no need for any case statements
a
Alexander Kloumann
09/01/2022, 4:42 PM
Hi @Anna Geller, thanks for letting me know about that June 2023 transition. For the if/else statements, do you mean that those can be run in flows in Prefect 1 or just Prefect 2? I've tried using if/else statements within flows in Prefect 1, for instance:
Copy code
source_ids = ['a', 'b', 'c']
with Flow("flow_name") as flow:
for source_id in source_ids:
data = extract(source_id)
if data:
data = transform(data)
load(data)
But if/else statements like this produce strange behavior and don't work as expected.
Thanks!
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.