Feature store vs data warehouse

A data warehouse stores history and answers analytical queries across many rows. A feature store computes features from one definition, keeps their history for training in an offline store, and serves the current value for one key to a model in production from an online store. The warehouse usually is the offline half; the online half is what it lacks.

By Alex DeanUpdated

What is the difference between a feature store and a data warehouse?

A data warehouse is built to scan and join large amounts of history, so analysts and jobs can ask questions across millions of rows. A feature store is built around the features a model reads. It holds each feature’s definition, builds training sets from its history, and hands the current value for one customer or session to a model while a request waits.

The two overlap more than the names suggest. Most feature stores keep their history in a warehouse or lakehouse, which they call the offline store. What a warehouse does not do on its own is the other half. That half is the online store, which answers one key at a time, fast, every time a model is called. Online vs offline features covers how those two halves relate.

Data warehouse Feature store: offline store Feature store: online store
Built for Analytics, reporting, transformation Training sets and batch scoring Serving features at inference
Read pattern Scans and joins across many rows Scans and joins across many keys and timestamps One key per lookup, one request at a time
Latency class Throughput first; a query is too slow for a live request The same, usually because it is the warehouse Fast enough to sit inside a live request
Freshness As of the last load or transformation job As of the last batch run As current as the pipeline writing to it
Point-in-time correctness Possible, if you write the joins yourself Built in: values as of each label’s timestamp Not needed; it serves the value as of now
Who usually owns it Data or analytics engineering Data science and the ML platform team The ML platform team, often with application engineers on call

Can a data warehouse act as a feature store?

For the offline half, often yes. Computing features over history is what a warehouse is good at, and a team with one model can go a long way with SQL, dbt and a scheduled job that writes a feature table.

Two things get harder as you go. The first is point-in-time correctness: each training row needs the value a feature had at the moment of its label, not the value it has today, or the model learns from information it will not have in production. You can write those joins in SQL, but you write them for every feature and every label, and a mistake does not raise an error. The second is serving. A model scoring a live request needs one customer’s features back inside the request, and a warehouse query per prediction is too slow and too costly to put on that path. Teams copy the latest values to a key-value store, and that copy is the start of an online store.

Do I need a feature store if I have a data warehouse?

Not always. You probably do not need one if your models score in batch, such as a nightly churn score written back to a table, or if you have a few features that a shared, tested library computes the same way everywhere. The warehouse is enough.

The case grows when a model scores live requests, when several models share features, or when the same feature exists twice: once in SQL for training and once in application code for serving. That second copy is the usual source of training-serving skew, and removing it is most of what a feature store is for. Do you need a feature store? walks through the decision in more detail.

What are warehouse-native feature stores?

The three large data platforms now ship a feature store that uses the warehouse as its offline store and adds an online store you provision beside it.

  • Snowflake Feature Store. A feature store is a schema, and each feature view is a dynamic table or a view, refreshed by Snowflake or by an external pipeline such as dbt. Training data uses point-in-time correct ASOF joins. For online serving you have two routes. For batch-only reads you back feature views with hybrid tables. For streaming and REST reads you create an online service, which runs a Snowflake Postgres instance and bills from the moment it exists, then enable it per feature view. Values sync from the offline table on a schedule you set, or arrive through a streaming ingest API. Check the docs for supported regions, which do not yet include GCP.
  • Databricks Feature Store, also called Feature Engineering in Unity Catalog. A feature table is a Delta table in Unity Catalog with a primary key, and point-in-time lookups use a timestamp key. For serving you create an online store on Lakebase and publish each table to it, as a one-off snapshot, on a trigger or schedule, or continuously.
  • Vertex AI Feature Store over BigQuery. Your BigQuery tables and views are the offline store, so nothing is copied for training, and you query history at a point in time in BigQuery. For serving you create an online store instance, recommended on Bigtable, and feature views that sync from BigQuery.

All three remove the second implementation of a feature within their platform. None removes the work upstream. The online value is as current as the pipeline or sync feeding it, and the events behind it still have to be collected and modeled before the warehouse holds them.

Example: one feature, trained in the warehouse and served online

Take one feature: how many products a visitor viewed in the last 30 minutes, for a model that estimates whether this session ends in a purchase.

The warehouse-only version is a query. It is point-in-time correct because it counts only views before each label’s timestamp:

select l.session_id, l.label_time, l.purchased,
       count(e.event_id) as product_views_30m
from labels l
left join events e
  on e.session_id = l.session_id
 and e.event_name = 'product_view'
 and e.event_time < l.label_time
 and e.event_time >= dateadd(minute, -30, l.label_time)
group by l.session_id, l.label_time, l.purchased

That trains the model. To serve it, someone has to compute the same count for the session in front of the model, in a stream or in application code, and keep it agreeing with this query on late events, time zones and sessions that span midnight.

In Snowplow Signals, which calls each feature an attribute, the definition is written once with the Python SDK:

from datetime import timedelta
from snowplow_signals import Attribute, Event, StreamAttributeGroup, domain_sessionid

product_view = Event(name="product_view", vendor="com.example", version="1-0-0")

product_views_30m = Attribute(
    name="product_views_30m",
    type="int32",
    events=[product_view],
    aggregation="counter",
    period=timedelta(minutes=30),
    default_value=0,
)

browse_features = StreamAttributeGroup(
    name="browse_features",
    version=1,
    attribute_key=domain_sessionid,
    owner="you@example.com",
    attributes=[product_views_30m],
)

In the warehouse, for training. The dataset builder reads that group and the outcome you name, and writes one row per labeled moment to a table in the warehouse, with the attribute computed from only the events before that moment:

from snowplow_signals import AtomicProperty, Criteria, Criterion, TrainingSpan

run = sp_signals.submit_dataset_run_with_session_anchors(
    attribute_groups=[browse_features],
    goal_criteria=Criteria(all=[Criterion.eq(AtomicProperty(name="event"), "transaction")]),
    training_span=TrainingSpan(start_time=start, end_time=end),
)

Online, for inference. The same definition runs in the streaming engine, which updates the count for each open session as views arrive. The model reads the current value straight from the group:

features = sp_signals.get_group_attributes(
    name="browse_features",
    version=1,
    attributes=["product_views_30m"],
    attribute_key="domain_sessionid",
    identifier=session_id,
)
score = model.predict(features)

There is no SQL copy and no serving copy to keep in step. The dataset builder runs in Snowflake today, and the ML training datasets documentation covers it.

Where Signals fits

If your features are warehouse tables and your models score in batch, keep the warehouse and add nothing. If you need online serving and your data already lives in Snowflake, Databricks or BigQuery, the platform’s own feature store is the shortest route, and building the online half yourself on a key-value store is a fair choice for a team that wants to own it.

Snowplow Signals is one option when the features are customer behavior: what a visitor views, searches and adds to a basket in your product. It collects those events with its own SDKs, validates them, computes attributes in a streaming engine and serves them to your app or model. It works with the warehouse rather than replacing it. A batch engine backfills attribute history from it, and warehouse attributes serve a table such as a churn score or plan tier beside the live values, synced on a schedule you choose. It is a poor fit when most of a model’s inputs come from warehouse tables or third-party APIs rather than events, and it does not train or host models. Signals vs a feature store sets out the overlap, real-time attributes states the serving numbers, and the feature stores topic covers the rest, starting with what a feature store is.

See it on your own traffic

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.