Postgres tasks as part of collections

Hello everyone,

Currently, I’m managing some flows which uses Postgres Tasks functions of Prefect1.0. I was very pleased that Prefect2.0 added concurrency options as part of the open-source release, and I wanted to migrate some of our workflows to the 2.0 version as this would solve many of our issues.

I soon realized that this won’t be possible without quite heavily refactoring tasks, which uses the Postgres Task library from prefect.tasks.postgres.postgres.

Is there any plan to add these functions or its alternative to the Prefect 2.0 Collections?


1 Like

Hi @sasinka_radim, welcome to Prefect Discourse! :wave: Great to have you here!

A Postgres Prefect Collection is 100% on the roadmap! I can’t say when, but it will definitely be added.

If you would like to contribute in order to speed up the process, you may check those:

Otherwise, it will be added for sure sometime in the coming weeks or months.

Will be creating the postgres collection this week!

I wanted to ask which tasks you’re specifically using; is it just PostgresExecute or are you using PostgresExecuteMany and PostgresFetch too?

1 Like

Hi @ahuang11,
that’s great to hear. We were about to do that on our side as well, but this will help a ton.

We are currently using mostly PostgresExecute and PostgresFetch.



We decided to first release sqlalchemy, which supports postgres, here

1 Like