You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/oracledb/README.md
+7-18Lines changed: 7 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,32 +161,21 @@ Load documents from Oracle Autonomous Database using `OracleAutonomousDatabaseLo
161
161
from langchain_oracledb.document_loaders import OracleAutonomousDatabaseLoader
162
162
from settings import s
163
163
164
-
SQL_QUERY="select prod_id, time_id from sh.costs fetch first 5 rows only"
164
+
SQL_QUERY="select channel_id, channel_desc from sh.channels where channel_desc = :1 fetch first 5 rows only"
165
165
166
-
doc_loader_1= OracleAutonomousDatabaseLoader(
166
+
doc_loader= OracleAutonomousDatabaseLoader(
167
167
query=SQL_QUERY,
168
168
user=s.USERNAME,
169
169
password=s.PASSWORD,
170
170
schema=s.SCHEMA,
171
-
config_dir=s.CONFIG_DIR,
172
-
wallet_location=s.WALLET_LOCATION,
173
-
wallet_password=s.PASSWORD,
174
-
tns_name=s.TNS_NAME,
171
+
dsn=s.DSN,
172
+
parameters=["Direct Sales"],
175
173
)
176
-
doc_1 = doc_loader_1.load()
177
-
178
-
doc_loader_2 = OracleAutonomousDatabaseLoader(
179
-
query=SQL_QUERY,
180
-
user=s.USERNAME,
181
-
password=s.PASSWORD,
182
-
schema=s.SCHEMA,
183
-
connection_string=s.CONNECTION_STRING,
184
-
wallet_location=s.WALLET_LOCATION,
185
-
wallet_password=s.PASSWORD,
186
-
)
187
-
doc_2 = doc_loader_2.load()
174
+
doc = doc_loader.load()
188
175
```
189
176
177
+
With mutual TLS authentication (mTLS), wallet_location and wallet_password are required to create the connection, user can create connection by providing either connection string or tns configuration details. With TLS authentication, wallet_location and wallet_password are not required. Bind variable option is provided by argument "parameters".
0 commit comments