https://prefect.io logo
Title
m

merlin

11/14/2022, 5:02 AM
I dont understand the reason for Collections. For example, there is a SQLAlchemy Collection which can use
prefect_sqlalchemy.database.sqlalchemy_execute
to send a SQL statement to a DB. But I can do that with with the sqlalchemy python library directly and write flows around that. I must be missing the point?
1
m

Michiel Verburg

11/14/2022, 8:03 AM
I also do not understand the use case yet to be completely honest with you 😅
a

Anna Geller

11/14/2022, 1:16 PM
Collections are entirely optional. Their main purpose is easy integration with a wide variety of systems without you having to write that code e.g. code to talk to SQL alchemy
Think of it the same way as any Python package: sure, you could use CSV reader, but you could also import a CSV file in a single line of Pandas Additionally collections have blocks which allow to combine business logic with secure configuration and credentials data
🙌 1
1
m

merlin

11/14/2022, 2:46 PM
I guess sqlalchemy isnt the best example. I see the slack alert one incudes decorators, its convenient to use the collection vs write similar code for each application. _edit_: prefect-alert labelled as "Alert" on Collections page. This makes the usage more clear to me. Thanks again!
🙌 1