File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 11"""
2- Copyright (c) 2023 , Oracle and/or its affiliates.
2+ Copyright (c) 2025 , Oracle and/or its affiliates.
33Copyright (c) 2020, Vitor Avancini
44
55 Licensed under the Apache License, Version 2.0 (the "License");
@@ -208,11 +208,19 @@ def open(cls, connection):
208208 logger .debug (f"Attempting to connect using Oracle method: '{ method } ' "
209209 f"and dsn: '{ dsn } '" )
210210
211- conn_config = {
212- 'user' : credentials .user ,
213- 'password' : credentials .password ,
214- 'dsn' : dsn
215- }
211+ if credentials .password is None :
212+ logger .debug ("Password not supplied. "
213+ "Using external authentication" )
214+ conn_config = {
215+ 'externalauth' : True ,
216+ 'dsn' : dsn
217+ }
218+ else :
219+ conn_config = {
220+ 'user' : credentials .user ,
221+ 'password' : credentials .password ,
222+ 'dsn' : dsn
223+ }
216224
217225 if oracledb .__name__ == "oracledb" :
218226 conn_config ['connection_id_prefix' ] = f'dbt-oracle-{ dbt_version } -'
You can’t perform that action at this time.
0 commit comments