Hi I elaborated a recipe to connect to our oracle...
# ingestion
b
Hi I elaborated a recipe to connect to our oracle server as below:
Copy code
source:
  type: oracle
  config:
    username: user
    password: password
    host_port: myserver:1522
    
    service_name: servicename
which translate in the following DSN passed to sqlalchmy connect dialect
Copy code
'dsn': '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1522))(CONNECT_DATA=(SERVICE_NAME=myservicename)))'
however, the oracle server requires further parameters in the DSN in order to authenticate, as below:
Copy code
'dsn': '(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=myhost))(connect_data=(service_name=myservicename))(security=(ssl_server_cert_dn="CN=certsever, OU=Oracle, O=Oracle Corporation, L=City, ST=State, C=Country")))
Any idea on how to insert these extra parameters in the oracle recipe
w
Hi! You can add your extra parameters using
options
in your yml. See here -> https://datahubproject.io/docs/metadata-ingestion/source_docs/oracle#config-details
a
For even more flexibility, you can reference an entry from the tnsnames.ora file. For example you can put the whole DSN string in the tnsnames.ora file and give it myalias as name. Then in the recipe, remove the port from the string and refer to the alias like that
host_port: myalias
. You don't need the
service_name
in this case, just
host_port
,
username
and
password
.