PostgreSQL
Connect to your PostgreSQL databases.
Getting Started
Prerequisites to create a PostgreSQL based workflow. You will need
A source PostgreSQL connection.
(optional) A list of tables OR SQL queries.
(optional) A destination PostgreSQL connection.
For the source database connection, we recommend using a backup or clone with read-only permissions, instead of connecting directly to your production database.
Do not use your input database connection as an output connector. This action can result in the unintended overwriting of existing data.
Create a Connection
A postgres
connection is created using the following parameters:
Connection Creation Parameters
name
Display name of your choosing used to identify your connection within Gretel.
my-postgres-connection
username
Unique identifier associated with specific account authorized to access database.
john
password
Security credential to authenticate username.
...
host
Fully qualified domain name (FQDN) used to establish connection to database server.
myserver.example.com
port
Port number; If left empty, the default value - 5432
- will be used.
5432
database
Name of database to connect to.
mydatabase
(optional) schema
Optional Name of specific schema
public
(optional) params
Optional JDBC URL parameters that can be used for advanced configuration.
TrustServerCertificate=True&useSSL=false
Creating Connections
First, create a file on your local computer containing the connection credentials. This file should also include type
, name
, config
, and credentials
. The config
and credentials
fields should contain fields that are specific to the connection being created.
Below is an example PostgreSQL connection:
Now that you've created the credentials file, use the CLI to create the connection
Last updated
Was this helpful?