Skip to content

Commit a76c6d0

Browse files
authored
fix: Clean up Rockset Online Store for use (#3549)
Fix: Minor fixups for Rockset Online Store - Fix Rockset markup link - Fix feast init to allow for option "rockset" and update bootstrap to take an empty string. - Some cleanup to the markup description Signed-off-by: Daniel Lin <dan@rockset.com>
1 parent d2d13b1 commit a76c6d0

File tree

5 files changed

+69
-9
lines changed

5 files changed

+69
-9
lines changed

docs/reference/online-stores/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Please see [Online Store](../../getting-started/architecture-and-components/onli
4242
[mysql.md](mysql.md)
4343
{% endcontent-ref %}
4444

45-
{% content-ref url="mysql.md" %}
45+
{% content-ref url="rockset.md" %}
4646
[rockset.md](rockset.md)
4747
{% endcontent-ref %}
4848

docs/reference/online-stores/rockset.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
In Alpha Development.
66

7-
The [Rockset](https://rockset.com/demo-signup/) online store provides support for materializing feature values within a Rockset collection for serving online features in real-time.
7+
The [Rockset](https://rockset.com/demo-signup/) online store provides support for materializing feature values within a Rockset collection in order to serve features in real-time.
88

99
* Each document is uniquely identified by its '_id' value. Repeated inserts into the same document '_id' will result in an upsert.
1010

11-
Rockset indexes all columns allowing for quick per feature look up and also allows for a dynamic typed schema that can change based on any new requirements. ApiKeys can be found in the console
12-
along with host urls which you can find in "View Region Endpoint Urls".
11+
Rockset indexes all columns allowing for quick per feature look up and also allows for a dynamic typed schema that can change based on any new requirements. API Keys can be found in the Rockset console.
12+
You can also find host urls on the same tab by clicking "View Region Endpoint Urls".
1313

1414
Data Model Used Per Doc
1515

@@ -32,7 +32,53 @@ project: my_feature_app
3232
registry: data/registry.db
3333
provider: local
3434
online_stores
35+
## Basic Configs ##
36+
37+
# If apikey or host is left blank the driver will try to pull
38+
# these values from environment variables ROCKSET_APIKEY and
39+
# ROCKSET_APISERVER respectively.
3540
type: rockset
36-
apikey: MY_APIKEY_HERE
37-
host: api.usw2a1.rockset.com
41+
apikey: <your_api_key_here>
42+
host: <your_region_endpoint_here>
43+
44+
## Advanced Configs ##
45+
46+
# Batch size of records that will be turned per page when
47+
# paginating a batched read.
48+
#
49+
# read_pagination_batch_size: 100
50+
51+
# The amount of time, in seconds, we will wait for the
52+
# collection to become visible to the API.
53+
#
54+
# collection_created_timeout_secs: 60
55+
56+
# The amount of time, in seconds, we will wait for the
57+
# collection to enter READY state.
58+
#
59+
# collection_ready_timeout_secs: 1800
60+
61+
# Whether to wait for all writes to be flushed from log
62+
# and queryable before returning write as completed. If
63+
# False, documents that are written may not be seen
64+
# immediately in subsequent reads.
65+
#
66+
# fence_all_writes: True
67+
68+
# The amount of time we will wait, in seconds, for the
69+
# write fence to be passed
70+
#
71+
# fence_timeout_secs: 600
72+
73+
# Initial backoff, in seconds, we will wait between
74+
# requests when polling for a response.
75+
#
76+
# initial_request_backoff_secs: 2
77+
78+
# Initial backoff, in seconds, we will wait between
79+
# requests when polling for a response.
80+
# max_request_backoff_secs: 30
81+
82+
# The max amount of times we will retry a failed request.
83+
# max_request_attempts: 10000
3884
```

sdk/python/feast/cli.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,17 @@ def materialize_incremental_command(ctx: click.Context, end_ts: str, views: List
631631
"--template",
632632
"-t",
633633
type=click.Choice(
634-
["local", "gcp", "aws", "snowflake", "spark", "postgres", "hbase", "cassandra"],
634+
[
635+
"local",
636+
"gcp",
637+
"aws",
638+
"snowflake",
639+
"spark",
640+
"postgres",
641+
"hbase",
642+
"cassandra",
643+
"rockset",
644+
],
635645
case_sensitive=False,
636646
),
637647
help="Specify a template for the created project",

sdk/python/feast/repo_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ def __init__(self, **data: Any):
217217
self._online_config = "datastore"
218218
elif data["provider"] == "aws":
219219
self._online_config = "dynamodb"
220+
elif data["provider"] == "rockset":
221+
self._online_config = "rockset"
220222

221223
self._batch_engine = None
222224
if "batch_engine" in data:

sdk/python/feast/templates/rockset/bootstrap.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ def bootstrap():
1313
data_path.mkdir(exist_ok=True)
1414

1515
rockset_apikey = click.prompt(
16-
"Rockset Api Key (If blank will be read from ROCKSET_APIKEY in ENV):"
16+
"Rockset Api Key (If blank will be read from ROCKSET_APIKEY in ENV):",
17+
default="",
1718
)
1819

1920
rockset_host = click.prompt(
20-
"Rockset Host (If blank will be read from ROCKSET_APISERVER in ENV):"
21+
"Rockset Host (If blank will be read from ROCKSET_APISERVER in ENV):",
22+
default="",
2123
)
2224

2325
replace_str_in_file(config_file, "ROCKSET_APIKEY", rockset_apikey)

0 commit comments

Comments
 (0)