Search…
Feast CLI reference

Overview

The Feast CLI comes bundled with the Feast Python package. It is immediately available after installing Feast.
1
Usage: feast [OPTIONS] COMMAND [ARGS]...
2
3
Feast CLI
4
5
For more information, see our public docs at https://docs.feast.dev/
6
7
For any questions, you can reach us at https://slack.feast.dev/
8
9
Options:
10
-c, --chdir TEXT Switch to a different feature repository directory before
11
executing the given subcommand.
12
13
--help Show this message and exit.
14
15
Commands:
16
apply Create or update a feature store deployment
17
entities Access entities
18
feature-views Access feature views
19
init Create a new Feast repository
20
materialize Run a (non-incremental) materialization job to...
21
materialize-incremental Run an incremental materialization job to ingest...
22
registry-dump Print contents of the metadata registry
23
teardown Tear down deployed feature store infrastructure
24
version Display Feast SDK version
Copied!

Global Options

The Feast CLI provides one global top-level option that can be used with other commands
chdir (-c, --chdir)
This command allows users to run Feast CLI commands in a different folder from the current working directory.
1
feast -c path/to/my/feature/repo apply
Copied!

Apply

Creates or updates a feature store deployment
1
feast apply
Copied!
What does Feast apply do?
    1.
    Feast will scan Python files in your feature repository and find all Feast object definitions, such as feature views, entities, and data sources.
    2.
    Feast will validate your feature definitions
    3.
    Feast will sync the metadata about Feast objects to the registry. If a registry does not exist, then it will be instantiated. The standard registry is a simple protobuf binary file that is stored on disk (locally or in an object store).
    4.
    Feast CLI will create all necessary feature store infrastructure. The exact infrastructure that is deployed or configured depends on the provider configuration that you have set in feature_store.yaml. For example, setting local as your provider will result in a sqlite online store being created.
feast apply (when configured to use cloud provider like gcp or aws) will create cloud infrastructure. This may incur costs.

Entities

List all registered entities
1
feast entities list
Copied!
1
NAME DESCRIPTION TYPE
2
driver_id driver id ValueType.INT64
Copied!

Feature views

List all registered feature views
1
feast feature-views list
Copied!
1
NAME ENTITIES
2
driver_hourly_stats ['driver_id']
Copied!

Init

Creates a new feature repository
1
feast init my_repo_name
Copied!
1
Creating a new Feast repository in /projects/my_repo_name.
Copied!
1
.
2
├── data
3
│ └── driver_stats.parquet
4
├── example.py
5
└── feature_store.yaml
Copied!
It's also possible to use other templates
1
feast init -t gcp my_feature_repo
Copied!
or to set the name of the new project
1
feast init -t gcp my_feature_repo
Copied!

Materialize

Load data from feature views into the online store between two dates
1
feast materialize 2020-01-01T00:00:00 2022-01-01T00:00:00
Copied!
Load data for specific feature views into the online store between two dates
1
feast materialize -v driver_hourly_stats 2020-01-01T00:00:00 2022-01-01T00:00:00
Copied!
1
Materializing 1 feature views from 2020-01-01 to 2022-01-01
2
3
driver_hourly_stats:
4
100%|██████████████████████████| 5/5 [00:00<00:00, 5949.37it/s]
Copied!

Materialize incremental

Load data from feature views into the online store, beginning from either the previous materialize or materialize-incremental end date, or the beginning of time.
1
feast materialize-incremental 2022-01-01T00:00:00
Copied!

Teardown

Tear down deployed feature store infrastructure
1
feast teardown
Copied!

Version

Print the current Feast version
1
feast version
Copied!
Last modified 2mo ago