Hey everyone! Can the Progres Tasks support connec...
# ask-community
j
Hey everyone! Can the Progres Tasks support connection to an SSH Forward Tunneler object. Also can I have an example of how to use the Postgres task
k
Hi @John Urbanik, it doesn’t but it looks like you can wrap that code in your own task if you just wrap this code .
j
@John Ramirez
k
Usage of Postgres will look like this:
Copy code
from prefect import task, Flow
from prefect.tasks.postgres import PostgresExecute

pgtask = PostgresExecute(db_name="test", user="test", host="test")

with Flow("test") as flow:
    pgtask.run(query="SELECT * FROM db")