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
uriThe URI of the Db2 database.
credentialsCredentials for authenticating with the database.
enforce_connection_paramsWhether to enforce connection parameters for the Db2 connection. Applicable only for a connection to a Db2 Destination. Defaults to True.
cx_src_configs_db2Source-specific configuration parameters for the Db2 connection. Defaults to None.
cx_dst_configs_db2Destination-specific configuration parameters for the Db2 connection. Defaults to None.
Raises
ConnectionConfigurationError: If any connection configurations are invalid.
Properties
credentialsUserPasswordCredentials | NoneThe credentials required to access the Db2 database. If no credentials were provided, it will return None.
cx_dst_configs_db2dictDestination-specific configuration parameters for the Db2 connection.
cx_src_configs_db2dictSource-specific configuration parameters for the Db2 connection.
enforce_connection_paramsboolWhether to enforce connection parameters for the Db2 connection.
uristrThe URI of the database where the data is located.