|
| 1 | +# Couchbase Online Store |
| 2 | +> NOTE: |
| 3 | +> This is a community-contributed online store that is in alpha development. It is not officially supported by the Feast project. |
| 4 | +
|
| 5 | +## Description |
| 6 | +The [Couchbase](https://www.couchbase.com/) online store provides support for materializing feature values into a Couchbase Operational cluster for serving online features in real-time. |
| 7 | + |
| 8 | +* Only the latest feature values are persisted |
| 9 | +* Features are stored in a document-oriented format |
| 10 | + |
| 11 | +The data model for using Couchbase as an online store follows a document format: |
| 12 | +* Document ID: `{project}:{table_name}:{entity_key_hex}:{feature_name}` |
| 13 | +* Document Content: |
| 14 | + * `metadata`: |
| 15 | + * `event_ts` (ISO formatted timestamp) |
| 16 | + * `created_ts` (ISO formatted timestamp) |
| 17 | + * `feature_name` (String) |
| 18 | + * `value` (Base64 encoded protobuf binary) |
| 19 | + |
| 20 | + |
| 21 | +## Getting started |
| 22 | +In order to use this online store, you'll need to run `pip install 'feast[couchbase]'`. You can then get started with the command `feast init REPO_NAME -t couchbase`. |
| 23 | + |
| 24 | +To get started with Couchbase Capella Operational: |
| 25 | +1. [Sign up for a Couchbase Capella account](https://docs.couchbase.com/cloud/get-started/create-account.html#sign-up-free-tier) |
| 26 | +2. [Deploy an Operational cluster](https://docs.couchbase.com/cloud/get-started/create-account.html#getting-started) |
| 27 | +3. [Create a bucket](https://docs.couchbase.com/cloud/clusters/data-service/manage-buckets.html#add-bucket) |
| 28 | + - This can be named anything, but must correspond to the bucket described in the `feature_store.yaml` configuration file. |
| 29 | +4. [Create cluster access credentials](https://docs.couchbase.com/cloud/clusters/manage-database-users.html#create-database-credentials) |
| 30 | + - These credentials should have full access to the bucket created in step 3. |
| 31 | +5. [Configure allowed IP addresses](https://docs.couchbase.com/cloud/clusters/allow-ip-address.html) |
| 32 | + - You must allow the IP address of the machine running Feast. |
| 33 | + |
| 34 | +## Example |
| 35 | +{% code title="feature_store.yaml" %} |
| 36 | +```yaml |
| 37 | +project: my_feature_repo |
| 38 | +registry: data/registry.db |
| 39 | +provider: local |
| 40 | +online_store: |
| 41 | + type: couchbase |
| 42 | + connection_string: couchbase://127.0.0.1 # Couchbase connection string, copied from 'Connect' page in Couchbase Capella console |
| 43 | + user: Administrator # Couchbase username from access credentials |
| 44 | + password: password # Couchbase password from access credentials |
| 45 | + bucket_name: feast # Couchbase bucket name, defaults to feast |
| 46 | + kv_port: 11210 # Couchbase key-value port, defaults to 11210. Required if custom ports are used. |
| 47 | +entity_key_serialization_version: 2 |
| 48 | +``` |
| 49 | +{% endcode %} |
| 50 | +
|
| 51 | +The full set of configuration options is available in `CouchbaseOnlineStoreConfig`. |
| 52 | + |
| 53 | + |
| 54 | +## Functionality Matrix |
| 55 | +The set of functionality supported by online stores is described in detail [here](overview.md#functionality). |
| 56 | +Below is a matrix indicating which functionality is supported by the Couchbase online store. |
| 57 | + |
| 58 | +| | Couchbase | |
| 59 | +| :-------------------------------------------------------- | :-------- | |
| 60 | +| write feature values to the online store | yes | |
| 61 | +| read feature values from the online store | yes | |
| 62 | +| update infrastructure (e.g. tables) in the online store | yes | |
| 63 | +| teardown infrastructure (e.g. tables) in the online store | yes | |
| 64 | +| generate a plan of infrastructure changes | no | |
| 65 | +| support for on-demand transforms | yes | |
| 66 | +| readable by Python SDK | yes | |
| 67 | +| readable by Java | no | |
| 68 | +| readable by Go | no | |
| 69 | +| support for entityless feature views | yes | |
| 70 | +| support for concurrent writing to the same key | yes | |
| 71 | +| support for ttl (time to live) at retrieval | no | |
| 72 | +| support for deleting expired data | no | |
| 73 | +| collocated by feature view | yes | |
| 74 | +| collocated by feature service | no | |
| 75 | +| collocated by entity key | no | |
| 76 | + |
| 77 | +To compare this set of functionality against other online stores, please see the full [functionality matrix](overview.md#functionality-matrix). |
| 78 | + |
0 commit comments