Skip to content
Lucas Lessa
Back to news
SnowflakeGAImpact: High

Manage Snowflake Feature Store as code using the snow feature CLI

Declarative Feature Store is now GA in Snowflake. Define entities and feature views in YAML or Python and perform safe deployments using the snow feature CLI with plan-and-apply.

What changed

The Declarative Feature Store workflow in Snowflake is now generally available (GA). This release allows you to define Feature Store resources as local YAML or Python files and manage them using an Infrastructure as Code (IaC) approach with the snow feature group in Snowflake CLI.

Use cases

Imagine you need to keep dozens of machine learning features synchronized across development, staging, and production environments without executing manual imperative Python scripts. With the declarative approach, you can store your Feature Store definitions in Git repositories, conduct code reviews (PRs), and automate deployments through CI/CD.

You can:

  • Version control entities, data sources, feature views, and feature groups as YAML or Python files.
  • Preview execution plans (diff) before applying changes to Snowflake.
  • Promote changes across environments consistently and safely.

How to use

Install the required library in your environment and initialize the project:

# Install the required package
pip install -U "snowflake-ml-python[feature_store]"

# Create and initialize the local project
mkdir my_feature_store
cd my_feature_store
snow feature init

# Plan and apply changes
snow feature plan
snow feature apply

What happens in this code:

  1. Installs the snowflake-ml-python library with Feature Store support.
  2. Initializes the project directory structure (sources/) and manifest.yml based on the active Snowflake connection.
  3. The snow feature plan command compares local project files against the remote Snowflake environment and creates a plan diff file.
  4. The snow feature apply command applies the planned changes to Snowflake.

To interact with the online service for streaming ingestion and point queries:

# Create online service
snow feature online-service create --producer-role MY_PRODUCER --consumer-role MY_CONSUMER

# Ingest events and query features
snow feature ingest CLICKSTREAM_EVENTS --data events.json
snow feature query USER_CLICK_STATS_DECL --version V1 --keys '[{"USER_ID":"u1"}]'

What happens in this code:

  1. Sets up the infrastructure to serve low-latency features in a given schema.
  2. Ingests streaming event payloads formatted as JSON.
  3. Queries computed feature values for the provided entity keys.

Limitations and requirements

  • Requires the snowflake-ml-python[feature_store] library installed in the same Python interpreter as the Snowflake CLI.
  • Destructive operations (such as dropping or recreating feature views) are refused by default during apply. Pass the --destructive flag to allow them.
  • Deletion detection for resources omitted in local sources is disabled by default during plan. Use the --delete flag to surface missing objects as drop operations.

Using it in a pipeline

Add snow feature plan to your CI/CD Pull Request checks to validate declarative specifications and preview execution plans before merging code. Upon merging to the main branch, trigger snow feature apply in your deployment pipeline to update the target Snowflake environment automatically.

Read the official Snowflake note

October 21, 2026: Declarative Feature Store (General availability)

Summary and explanation generated by AI from the official release note. When in doubt, the platform's official documentation prevails.

Related