Skip to main content

pc.create_connection_postgres

pc.create_connection_postgres(name, address, database, username, password)

Create connection with PostgreSQL database.

Parameters:

   name: str
Name of connection.

   address: str
URL / hostname:port of the instance.

   database: str
Database name to pull tables from.

   username: str
User to authenticate as.

   password: str
Password used to authenticate.

Returns:

   Connection

Examples:

Connect to a Postgres database.

    connection = pc.create_connection_postgres('Postgres Connection', '{Database Url}', '{Database Name}', '{Username}', '{Password}')