Feature serving

This document describes your options for makingfeatures available for BigQuery MLmodel training and inference. For all options, you must save the features inBigQuery tables as a prerequisite first step.

Point-in-time correctness

The data used to train a model often has time dependencies built into it. Whenyou create a feature table for time sensitive features, include a timestampcolumn to represent the feature values as they existed at a given time for eachrow. You can then use point-in-time lookup functions when querying data fromthese feature tables in order to ensure that there is nodataleakage betweentraining and serving. This process enables point-in-time correctness.

Use the following functions to specify point-in-time cutoffs when retrievingtime sensitive features:

Serve features in BigQuery ML

To train models and perform batch inference in BigQuery ML, youcan retrieve features using one of the point-in-time lookup functions describedin thePoint-in-time correctness section. You caninclude these functions in thequery_statement clause of theCREATE MODEL statement fortraining, or in thequery_statement clause of the appropriate table-valuedfunction, such asML.PREDICT,for serving.

Serve features with Vertex AI Feature Store

To serve features to BigQuery ML models that areregistered in Vertex AI,you can useVertex AI Feature Store.Vertex AI Feature Store works on top of feature tables inBigQuery to manage and serve features with low latency. You canuseonline servingto retrieve features in real time for online prediction, and you can useoffline servingto retrieve features for model training.

For more information about preparing BigQuery feature datato be used in Vertex AI Feature Store, seePrepare data source.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.