BigQuery ML でモデルをトレーニングしてバッチ推論を実行するには、特定の時点の正確性で説明されている特定の時点のルックアップ関数のいずれかを使用して特徴を取得します。これらの関数は、CREATE MODEL ステートメントの query_statement 句(トレーニングの場合)または適切なテーブル値関数(ML.PREDICT など)の query_statement 句(サービングの場合)に含めることができます。
Vertex AI Feature Store で特徴をサービングする
Vertex AI に登録されている BigQuery ML モデルに特徴をサービングするには、Vertex AI Feature Store を使用します。Vertex AI Feature Store は、BigQuery の特徴テーブル上で動作し、低レイテンシで特徴の管理とサービングを行います。オンライン サービングを使用すると、オンライン予測用の特徴をリアルタイムで取得できます。また、オフライン サービングを使用すると、モデル トレーニング用の特徴を取得できます。
Vertex AI Feature Store で使用する BigQuery 特徴データの準備の詳細については、データソースを準備するをご覧ください。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eFeatures must be saved in BigQuery tables before they can be used for BigQuery ML model training and inference.\u003c/p\u003e\n"],["\u003cp\u003eIncluding a timestamp column in feature tables allows for point-in-time correctness, preventing data leakage between training and serving.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eML.FEATURES_AT_TIME\u003c/code\u003e and \u003ccode\u003eML.ENTITY_FEATURES_AT_TIME\u003c/code\u003e functions are used to specify point-in-time cutoffs when retrieving time-sensitive features.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery ML models can use point-in-time lookup functions in \u003ccode\u003eCREATE MODEL\u003c/code\u003e statements or in table-valued functions like \u003ccode\u003eML.PREDICT\u003c/code\u003e to retrieve features for training and batch inference.\u003c/p\u003e\n"],["\u003cp\u003eVertex AI Feature Store can be used to manage and serve features with low latency for BigQuery ML models registered in Vertex AI, supporting both real-time online prediction and offline model training.\u003c/p\u003e\n"]]],[],null,["# Feature serving\n===============\n\nThis document describes your options for making\n[features](/bigquery/docs/preprocess-overview) available for BigQuery ML\nmodel training and inference. For all options, you must save the features in\nBigQuery tables as a prerequisite first step.\n\nPoint-in-time correctness\n-------------------------\n\nThe data used to train a model often has time dependencies built into it. When\nyou create a feature table for time sensitive features, include a timestamp\ncolumn to represent the feature values as they existed at a given time for each\nrow. You can then use point-in-time lookup functions when querying data from\nthese feature tables in order to ensure that there is no [data\nleakage](https://en.wikipedia.org/wiki/Leakage_(machine_learning)) between\ntraining and serving. This process enables point-in-time correctness.\n\nUse the following functions to specify point-in-time cutoffs when retrieving\ntime sensitive features:\n\n- [`ML.FEATURES_AT_TIME`](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-feature-time)\n- [`ML.ENTITY_FEATURES_AT_TIME`](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-entity-feature-time)\n\nServe features in BigQuery ML\n-----------------------------\n\nTo train models and perform batch inference in BigQuery ML, you\ncan retrieve features using one of the point-in-time lookup functions described\nin the [Point-in-time correctness](#point-in-time_correctness) section. You can\ninclude these functions in the\n[`query_statement` clause](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create#query_statement) of the `CREATE MODEL` statement for\ntraining, or in the `query_statement` clause of the appropriate table-valued\nfunction, such as\n[`ML.PREDICT`](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-predict),\nfor serving.\n\nServe features with Vertex AI Feature Store\n-------------------------------------------\n\nTo serve features to BigQuery ML models that are\n[registered in Vertex AI](/bigquery/docs/managing-models-vertex#register_models),\nyou can use\n[Vertex AI Feature Store](/vertex-ai/docs/featurestore/latest/overview).\nVertex AI Feature Store works on top of feature tables in\nBigQuery to manage and serve features with low latency. You can\nuse [online serving](/vertex-ai/docs/featurestore/latest/serve-feature-values)\nto retrieve features in real time for online prediction, and you can use\n[offline serving](/vertex-ai/docs/featurestore/latest/serve-historical-features)\nto retrieve features for model training.\n\nFor more information about preparing BigQuery feature data\nto be used in Vertex AI Feature Store, see\n[Prepare data source](/vertex-ai/docs/featurestore/latest/prepare-data-source)."]]