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
Kevin Kho
06/10/2021, 8:03 PM
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 Urbanik
06/10/2021, 8:03 PM
@John Ramirez
k
Kevin Kho
06/10/2021, 8:07 PM
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")
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.