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
* Added oracle-db connector information.
* Added oracledb-connector information.
* Updated oracledb-connector for the correct documentation links
* Updated oracle-connector with metadata information.
* Updated file with the link to changed oracle-connector file.
* Modied index.md file to remove C# oracle connector entry.
* Updated TOC.yml for oracle database connector entry.
* Updated oracle-connector .md file for ms author.
* Updated oracle-connector.md for adding an important highlight.
* Updated these two files based on the reviewer feedback.
* Updated oracle-connector.md file for modifying custom mapping content.
* As per the MS git validation warning added relative path of record definition in the oracle-connector md file.
* Updated oracle-connector file for Oracle Java connector information.
* Updated oracle connector page for Java connector information.
* Fixed typo
* updated oracle connector page to fix the validation errors.
* Fixed validation errors in oracle connector page.
* Update oracle-connector.md
* Update .NET info in oracle-connector.md
* Update oracle-connector.md for formatting Java support table.
* Updated oracle connector page for additinal information on using Jaccard similarity in C# connector. Also, updated the table formatting for Java connector.
* Change single quotes to double quotes
Changed single quotes to double quotes to ensure correct C# syntax is used,
* Updated Oracledb Connector for Python
* Change ms.topic to article based on suggestion
* Address review comment
* Remove extra install step
---------
Co-authored-by: Minal Agashe <minal.n.agashe@oracle.com>
Co-authored-by: Alex Keh <alex.keh@oracle.com>
@@ -186,7 +204,44 @@ var collection = new OracleCollection<string, Hotel>("<connection string>", "skh
186
204
187
205
## Getting started
188
206
189
-
More information coming soon.
207
+
Install the Oracle Database Vector Store connector:
208
+
209
+
```cli
210
+
pip install semantic-kernel[oracledb]
211
+
```
212
+
213
+
Import the OracleSettings, OracleStore, and OracleCollection classes.
214
+
215
+
```python
216
+
from semantic_kernel.connectors.oracle import OracleSettings, OracleStore, OracleCollection
217
+
```
218
+
219
+
The OracleSettings class holds the configuration required to create an asynchronous connection to Oracle Database. The OracleStore class is used to store and retrieve data, while the OracleCollection class manages and searches records within a collection. Use these classes to set up the Oracle Vector Store.
220
+
221
+
```python
222
+
# Read the environment settings
223
+
oracle_settings = OracleSettings()
224
+
225
+
# Create a connection pool
226
+
pool =await oracle_settings.create_connection_pool(
227
+
wallet_location=<wallet_location>,
228
+
wallet_password=<wallet_password>)
229
+
230
+
# Create an Oracle Vector Store
231
+
store = OracleStore(
232
+
connection_pool=pool,
233
+
)
234
+
235
+
# Get a collection
236
+
collection =await store.get_collection(
237
+
record_type=HotelSample,
238
+
collection_name=Hotel,
239
+
embedding_generator=text_embedding)
240
+
241
+
# Create a collection if it does not exist
242
+
await collection.ensure_collection_exists()
243
+
```
244
+
190
245
::: zone-end
191
246
::: zone pivot="programming-language-java"
192
247
@@ -314,18 +369,18 @@ Here is a data model with `StorageName` set code sample and how that will be rep
Refer to the following Oracle Database Vector Store connector resources to learn more:
347
402
348
-
-[Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e)
403
+
-[Introducing the Oracle Database Vector Store Connector for Semantic Kernel](https://medium.com/oracledevs/announcing-the-oracle-database-vector-store-connector-for-semantic-kernel-adb83e806d4e)
349
404
Describes key connector features, classes, and guides the reader through a sample AI vector search application using the connector.
350
-
-[Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/VSConnector4SKClasses.html)
351
-
Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database.
352
-
-[Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html)
405
+
-[Documentation: Oracle Database Vector Store Connector Classes for Semantic Kernel (.NET) APIs](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/VSConnector4SKClasses.html)
406
+
Contains information on Oracle Database Vector Store connector classes for adding data, retrieving data, and performing vector search in the Oracle vector database.
407
+
-[Documentation: Oracle Data Provider for .NET](https://docs.oracle.com/en/database/oracle/oracle-database/23/odpnt/intro.html)
353
408
Contains information on Oracle Data Provider for .NET (ODP.NET), the ADO.NET data provider for Oracle Database Vector Store connector.
354
409
410
+
::: zone-end
411
+
::: zone pivot="programming-language-python"
412
+
413
+
## Data Mapping
414
+
415
+
The Oracle Database Vector Store connector provides a default mapper when mapping from the data model to storage. This mapper does a direct conversion of the list of properties on the data model to the Oracle Database columns to convert to the storage schema.
416
+
417
+
The Oracle Database Vector Store connector supports data model annotations and record definitions. Using annotations, the information can be provided to the data model for creating indexes and database column mapping. Using [record definitions](../schema-with-record-definition.md), the information can be defined and supplied separately from the data model.
418
+
419
+
The following table shows the default primary key data type mapping between Oracle Database and Python:
420
+
421
+
| Python Type | Oracle SQL Type |
422
+
|---------------------------|-----------------|
423
+
| str | VARCHAR(n), Using str(n) in the type option sets the Oracle VARCHAR length to n. If n is not specified, the default length is 4000. |
424
+
| int | NUMBER(10) |
425
+
| byte | NUMBER(3) |
426
+
| long | NUMBER(19) |
427
+
| decimal | NUMBER |
428
+
| float | BINARY_FLOAT |
429
+
| double | BINARY_DOUBLE |
430
+
| bool | BOOLEAN |
431
+
| UUID | RAW(16) |
432
+
| date | DATE |
433
+
| datetime.datetime | TIMESTAMP |
434
+
| datetime.timedelta | INTERVAL DAY TO SECOND |
435
+
| clob | CLOB, can be specified explicitly, not a native Python type |
436
+
| blob | BLOB, can be specified explicitly, not a native Python type |
437
+
| list[str], dict[str, Any]| JSON |
438
+
| list[dict[str, Any]]| JSON |
439
+
| bytes | RAW(2000) |
440
+
441
+
Starting with Oracle Database 23ai, database vectors can be mapped to Python data types. Multiple vector columns are supported. The following table shows the default vector property type mapping:
0 commit comments