Skip to main content
Version: 1.8.0

Db2Conn

class Db2Conn(
uri: str,
credentials: UserPasswordCredentials | None = None,
enforce_connection_params: bool = True,
cx_src_configs_db2: dict | None = None,
cx_dst_configs_db2: dict | None = None,
)

Bases: Conn

Categories: connections

Represents a connection configuration to Db2.

Initialize a Db2Conn instance.

Parameters

parameter
uri

The URI of the Db2 database.

parameter
credentials

Credentials for authenticating with the database.

parameter
enforce_connection_params

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

parameter
cx_src_configs_db2

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

parameter
cx_dst_configs_db2

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

Raises

ConnectionConfigurationError: If any connection configurations are invalid.

Properties

property
credentialsUserPasswordCredentials | None

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

property
cx_dst_configs_db2dict

Destination-specific configuration parameters for the Db2 connection.

property
cx_src_configs_db2dict

Source-specific configuration parameters for the Db2 connection.

property
enforce_connection_paramsbool

Whether to enforce connection parameters for the Db2 connection.

property
uristr

The URI of the database where the data is located.