File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Copyright (c) 2023 , Oracle and/or its affiliates.
2
+ Copyright (c) 2025 , Oracle and/or its affiliates.
3
3
Copyright (c) 2020, Vitor Avancini
4
4
5
5
Licensed under the Apache License, Version 2.0 (the "License");
@@ -208,11 +208,19 @@ def open(cls, connection):
208
208
logger .debug (f"Attempting to connect using Oracle method: '{ method } ' "
209
209
f"and dsn: '{ dsn } '" )
210
210
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
+ }
216
224
217
225
if oracledb .__name__ == "oracledb" :
218
226
conn_config ['connection_id_prefix' ] = f'dbt-oracle-{ dbt_version } -'
You can’t perform that action at this time.
0 commit comments