-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Cassandra/AstraDB online store contribution (#2873)
* Cassandra online store * Refactor file-editing to a shared utils module * Use f-strings in the CassandraOnlineStoreCreator * Specify version 2 in serializing to make the entity key * Remove unnecessary empty comment lines * Rename proj to columns in _read_rows_by_entity_key * Introduce Cassandra-specific pytest targets * Adapt roadmaps and docs to cover/index Cassandra online store * Add license notes to code files Signed-off-by: Stefano Lottini <[email protected]> * remove from main CI path and update entity key serialization in template Signed-off-by: Danny Chiao <[email protected]> * revert makefile change Signed-off-by: Danny Chiao <[email protected]> Co-authored-by: Kevin Zhang <[email protected]> Co-authored-by: Danny Chiao <[email protected]>
- Loading branch information
1 parent
d4c15e7
commit feb6cb8
Showing
32 changed files
with
1,432 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Cassandra / Astra DB online store | ||
|
||
## Description | ||
|
||
The [Cassandra / Astra DB] online store provides support for materializing feature values into an Apache Cassandra / Astra DB database for online features. | ||
|
||
* The whole project is contained within a Cassandra keyspace | ||
* Each feature view is mapped one-to-one to a specific Cassandra table | ||
* This implementation inherits all strengths of Cassandra such as high availability, fault-tolerance, and data distribution | ||
|
||
An easy way to get started is the command `feast init REPO_NAME -t cassandra`. | ||
|
||
### Example (Cassandra) | ||
|
||
{% code title="feature_store.yaml" %} | ||
```yaml | ||
project: my_feature_repo | ||
registry: data/registry.db | ||
provider: local | ||
online_store: | ||
type: cassandra | ||
hosts: | ||
- 192.168.1.1 | ||
- 192.168.1.2 | ||
- 192.168.1.3 | ||
keyspace: KeyspaceName | ||
port: 9042 # optional | ||
username: user # optional | ||
password: secret # optional | ||
protocol_version: 5 # optional | ||
load_balancing: # optional | ||
local_dc: 'datacenter1' # optional | ||
load_balancing_policy: 'TokenAwarePolicy(DCAwareRoundRobinPolicy)' # optional | ||
``` | ||
{% endcode %} | ||
### Example (Astra DB) | ||
{% code title="feature_store.yaml" %} | ||
```yaml | ||
project: my_feature_repo | ||
registry: data/registry.db | ||
provider: local | ||
online_store: | ||
type: cassandra | ||
secure_bundle_path: /path/to/secure/bundle.zip | ||
keyspace: KeyspaceName | ||
username: Client_ID | ||
password: Client_Secret | ||
protocol_version: 4 # optional | ||
load_balancing: # optional | ||
local_dc: 'eu-central-1' # optional | ||
load_balancing_policy: 'TokenAwarePolicy(DCAwareRoundRobinPolicy)' # optional | ||
|
||
``` | ||
{% endcode %} | ||
|
||
For a full explanation of configuration options please look at file | ||
`sdk/python/feast/infra/online_stores/contrib/cassandra_online_store/README.md`. | ||
|
||
Storage specifications can be found at `docs/specs/online_store_format.md`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...python/docs/source/feast.infra.online_stores.contrib.cassandra_online_store.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
feast.infra.online\_stores.contrib.cassandra\_online\_store package | ||
=================================================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
feast.infra.online\_stores.contrib.cassandra\_online\_store.cassandra\_online\_store module | ||
------------------------------------------------------------------------------------------- | ||
|
||
.. automodule:: feast.infra.online_stores.contrib.cassandra_online_store.cassandra_online_store | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: feast.infra.online_stores.contrib.cassandra_online_store | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.