Skip to main content
Version: 1.7.0

PostgresConn

class PostgresConn(
uri: str,
credentials: UserPasswordCredentials | None = None,
enforce_connection_params: bool = True,
cx_src_configs_postgres: dict | None = None,
cx_dst_configs_postgres: dict | None = None,
)

Bases: Conn

Categories: connections

Represents a connection configuration to Postgres.

Initialize a PostgresConn instance.

Parameters

parameter
uri

The URI of the Postgres database.

parameter
credentials

Credentials for authenticating with the database.

parameter
enforce_connection_params

Whether to enforce connection parameters for the Postgres connection. Applicable only for a connection to a Postgres Destination. Defaults to True.

parameter
cx_src_configs_postgres

Source-specific configuration parameters for the Postgres connection. Defaults to None.

parameter
cx_dst_configs_postgres

Destination-specific configuration parameters for the Postgres connection. Defaults to None.

Raises

ConnectionConfigurationError: If any connection configurations are invalid.

Properties

property
credentialsUserPasswordCredentials | None

The credentials required to access the Postgres database. If no credentials were provided, it will return None.

property
cx_dst_configs_postgresdict

Destination-specific configuration parameters for the Postgres connection.

property
cx_src_configs_postgresdict

Source-specific configuration parameters for the Postgres connection.

property
enforce_connection_paramsbool

Whether to enforce connection parameters for the Postgres connection.

property
uristr

The URI of the database where the data is located.