forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.py
More file actions
30 lines (21 loc) · 854 Bytes
/
Copy pathbootstrap.py
File metadata and controls
30 lines (21 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import click
from feast.file_utils import replace_str_in_file
def bootstrap():
# Bootstrap() will automatically be called from the init_repo() during `feast init`
import pathlib
repo_path = pathlib.Path(__file__).parent.absolute() / "feature_repo"
config_file = repo_path / "feature_store.yaml"
data_path = repo_path / "data"
data_path.mkdir(exist_ok=True)
rockset_apikey = click.prompt(
"Rockset Api Key (If blank will be read from ROCKSET_APIKEY in ENV):",
default="",
)
rockset_host = click.prompt(
"Rockset Host (If blank will be read from ROCKSET_APISERVER in ENV):",
default="",
)
replace_str_in_file(config_file, "ROCKSET_APIKEY", rockset_apikey)
replace_str_in_file(config_file, "ROCKSET_APISERVER", rockset_host)
if __name__ == "__main__":
bootstrap()