Open VenkatArra opened 1 month ago
dbt-oracle uses python-oracledb for Connecting to Database. We will check if the Python driver supports LDAP authentication
@VenkatArra
Could you give some details ?
thick
mode of the python driver with dbt-oracle? In thick
mode the Python driver will read sqlnet.ora
and ldap.ora
To enable the thick mode, you can set ORA_PYTHON_DRIVER_TYPE
and run dbt
:
export ORA_PYTHON_DRIVER_TYPE=thick && dbt <command>
Note that thick mode needs access to the Oracle Client Libraries installed. You can follow instructions here : https://docs.getdbt.com/docs/core/connect-data-platform/oracle-setup#install-oracle-instant-client-libraries
@aosingh Thanks for looking into this.
Please find my answers below.
Please share any other information and may be samples with LDAP if available. Thanks again.
Hi @VenkatArra
For LDAP connection, Could you try the following:
dbt_test:
target: "{{ env_var('DBT_TARGET', 'dev') }}"
outputs:
dev:
type: oracle
user: "{{ env_var('DBT_ORACLE_USER') }}"
pass: "{{ env_var('DBT_ORACLE_PASSWORD') }}"
database: "{{ env_var('DBT_ORACLE_DATABASE') }}"
schema: "{{ env_var('DBT_ORACLE_SCHEMA') }}"
connection_string: "{{ env_var('DBT_ORACLE_CONNECT_STRING') }}"
ldaps://ldapserver.example.com/cn=orcl,cn=OracleContext,dc=example,dc=com
and
ldaps://ldapserver.example.com/cn=orcl,cn=OracleContext,dc=example,dc=com?DIRECTORY_SERVER_TYPE=AD&WALLET_LOCATION=/app/wallet&AUTHENTICATE_BIND=true&AUTHENTICATE_BIND_METHOD=LDAPS_SIMPLE_AUTH
export ORA_PYTHON_DRIVER_TYPE=thick && dbt <command>
@VenkatArra Were you able to verify LDAP connection ?
@aosingh Thanks for the instructions for LDAP connection. Since it involves thick driver mode and other setup we are not planning to do this currently. We'd like to continue with thin mode for now without LDAP.
Is there an existing issue for this?
Current Behavior
I did not find any documentation on how to establish connection using LDAP.
Expected Behavior
Share documentation and samples on how to establish connection using LDAP. Like any additional setup needed, how profiles.yml look etc.
Steps To Reproduce
Mac/Linux.
Relevant log output using
--debug
flag enabledEnvironment
What Oracle database version are you using dbt with?
19c, 21c
Additional Context
No response