informatica.infacore.datasource.datasource.DataSource.connect
- DataSource.connect(connection_name: str, connection_parameters: dict)
Creates a live connection with the data source instance you specified to read from or to write data.
- Parameters:
connection_name (str) – A name for the connection that you want to create.
connection_parameters (dict) – The connection attributes in “key, value” pairs to create a connection with the data source instance.
- Returns:
A newly created connection object for the data source.
- Return type:
Example
>>> import informatica.infacore as ic >>> orcl_ds = ic.get_datasource("Oracle") >>> orcl_params = { "oracleSubType": "oracleonpremise", "username": "<Username of Oracle database>", "password": "<Password of Oracle database>", "host": "<Hostname of Oracle database>", "port": "1521", "database": "<Database name>", "codePage": "UTF-8", "encryptionMethod": "NoEncryption", "CryptoProtocolVersion": "TLSv1", "ValidateServerCertificate": "False" } >>> orcl_cnx = orcl_ds.connect(connection_name="Oracle Sandbox", connection_parameters=orcl_params)