|
| 1 | +# Oracle offline store (contrib) |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +The Oracle offline store provides support for reading [OracleSources](../data-sources/oracle.md). |
| 6 | +* Entity dataframes can be provided as a SQL query or as a Pandas dataframe. |
| 7 | +* Uses the [ibis](https://ibis-project.org/) Oracle backend (`ibis.oracle`) for all database interactions. |
| 8 | +* Only one of `service_name`, `sid`, or `dsn` may be set in the configuration. |
| 9 | + |
| 10 | +## Disclaimer |
| 11 | + |
| 12 | +The Oracle offline store does not achieve full test coverage. |
| 13 | +Please do not assume complete stability. |
| 14 | + |
| 15 | +## Getting started |
| 16 | + |
| 17 | +Install the Oracle extras: |
| 18 | + |
| 19 | +```bash |
| 20 | +pip install 'feast[oracle]' |
| 21 | +``` |
| 22 | + |
| 23 | +## Example |
| 24 | + |
| 25 | +{% code title="feature_store.yaml" %} |
| 26 | +```yaml |
| 27 | +project: my_project |
| 28 | +registry: data/registry.db |
| 29 | +provider: local |
| 30 | +offline_store: |
| 31 | + type: oracle |
| 32 | + host: DB_HOST |
| 33 | + port: 1521 |
| 34 | + user: DB_USERNAME |
| 35 | + password: DB_PASSWORD |
| 36 | + service_name: ORCL |
| 37 | +online_store: |
| 38 | + path: data/online_store.db |
| 39 | +``` |
| 40 | +{% endcode %} |
| 41 | +
|
| 42 | +Connection can alternatively use `sid` or `dsn` instead of `service_name`: |
| 43 | + |
| 44 | +```yaml |
| 45 | +# Using SID |
| 46 | +offline_store: |
| 47 | + type: oracle |
| 48 | + host: DB_HOST |
| 49 | + port: 1521 |
| 50 | + user: DB_USERNAME |
| 51 | + password: DB_PASSWORD |
| 52 | + sid: ORCL |
| 53 | +
|
| 54 | +# Using DSN |
| 55 | +offline_store: |
| 56 | + type: oracle |
| 57 | + host: DB_HOST |
| 58 | + port: 1521 |
| 59 | + user: DB_USERNAME |
| 60 | + password: DB_PASSWORD |
| 61 | + dsn: "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DB_HOST)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))" |
| 62 | +``` |
| 63 | + |
| 64 | +### Configuration reference |
| 65 | + |
| 66 | +| Parameter | Required | Default | Description | |
| 67 | +| :------------- | :------- | :---------- | :------------------------------------------------------- | |
| 68 | +| `type` | yes | — | Must be set to `oracle` | |
| 69 | +| `user` | yes | — | Oracle database user | |
| 70 | +| `password` | yes | — | Oracle database password | |
| 71 | +| `host` | no | `localhost` | Oracle database host | |
| 72 | +| `port` | no | `1521` | Oracle database port | |
| 73 | +| `service_name` | no | — | Oracle service name (mutually exclusive with sid and dsn) | |
| 74 | +| `sid` | no | — | Oracle SID (mutually exclusive with service_name and dsn) | |
| 75 | +| `database` | no | — | Oracle database name | |
| 76 | +| `dsn` | no | — | Oracle DSN string (mutually exclusive with service_name and sid) | |
| 77 | + |
| 78 | +## Functionality Matrix |
| 79 | + |
| 80 | +The set of functionality supported by offline stores is described in detail [here](overview.md#functionality). |
| 81 | +Below is a matrix indicating which functionality is supported by the Oracle offline store. |
| 82 | + |
| 83 | +| | Oracle | |
| 84 | +| :----------------------------------------------------------------- | :----- | |
| 85 | +| `get_historical_features` (point-in-time correct join) | yes | |
| 86 | +| `pull_latest_from_table_or_query` (retrieve latest feature values) | yes | |
| 87 | +| `pull_all_from_table_or_query` (retrieve a saved dataset) | yes | |
| 88 | +| `offline_write_batch` (persist dataframes to offline store) | yes | |
| 89 | +| `write_logged_features` (persist logged features to offline store) | yes | |
| 90 | + |
| 91 | +Below is a matrix indicating which functionality is supported by `OracleRetrievalJob`. |
| 92 | + |
| 93 | +| | Oracle | |
| 94 | +| ----------------------------------------------------- | ------ | |
| 95 | +| export to dataframe | yes | |
| 96 | +| export to arrow table | yes | |
| 97 | +| export to arrow batches | no | |
| 98 | +| export to SQL | no | |
| 99 | +| export to data lake (S3, GCS, etc.) | no | |
| 100 | +| export to data warehouse | no | |
| 101 | +| export as Spark dataframe | no | |
| 102 | +| local execution of Python-based on-demand transforms | yes | |
| 103 | +| remote execution of Python-based on-demand transforms | no | |
| 104 | +| persist results in the offline store | yes | |
| 105 | +| preview the query plan before execution | no | |
| 106 | +| read partitioned data | no | |
| 107 | + |
| 108 | +To compare this set of functionality against other offline stores, please see the full [functionality matrix](overview.md#functionality-matrix). |
| 109 | + |
0 commit comments