Collaborating within and across teams to manage data and models · Topic 2 of 4

Feature Store and Protecting Sensitive Data

Create and share features in Gemini Enterprise Agent Platform Feature Store on BigQuery, and protect PII with de-identification, IAM and policy controls.

  • 5 min
In a nutshell
  • Feature Store uses BigQuery as the offline store; register tables or views as feature groups.
  • Feature views sync selected features into an online store for low-latency serving.
  • A feature timestamp enables point-in-time correct training data and prevents leakage.

What it is

Gemini Enterprise Agent Platform Feature Store is a central place to define, share and serve ML features. Teams register features once and reuse them, instead of each team rebuilding "customer spend in the last 30 days" in its own way.

Training data often contains personally identifiable information (PII) such as names, emails, card numbers and addresses. The engineer must find it, remove or transform what the model does not need, and limit who can see the rest.

BigQuery feature tablesFeature groupregistered featuresFeature viewOnline storelow latency servingBigQuery feature tablesTraining datapoint in time

How it works

How Feature Store is organized

In the current Feature Store, BigQuery is the offline store. You do not copy data into a separate system; you register BigQuery tables or views.

ConceptMeaning
Feature groupA registration of a BigQuery table or view as a feature source, with its entity ID column
FeatureOne column of a feature group, for example avg_spend_30d
Online storeThe resource that serves features at low latency
Feature viewA set of features copied into an online store and kept up to date by sync runs (scheduled or manual)
feature_timestamp columnRecords when each value was true, enabling point-in-time training data

Online stores use Bigtable online serving, the recommended type, which handles large data volumes and supports scheduled or continuous sync. Optimized online serving is the only type with embedding (vector) management, but it is deprecated and due to retire in February 2027.

-- A BigQuery source table that can be registered as a feature group
-- (append each day's snapshot instead of replacing it to keep history for point-in-time training)
CREATE OR REPLACE TABLE features.customer_daily AS
SELECT
  customer_id,
  CURRENT_TIMESTAMP() AS feature_timestamp,
  AVG(amount) AS avg_spend_30d,
  COUNT(*) AS orders_30d
FROM sales.orders
WHERE order_ts >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
GROUP BY customer_id;

Creating and consolidating features

  • Define features once, in SQL or a pipeline, and register them so other teams can discover them.
  • Consolidate duplicates: when two teams compute the same feature differently, agree on one definition and retire the other.
  • Use point-in-time values for training, so each training example only sees feature values that existed at the label's timestamp.
  • Serve the same features online through a feature view, so training and serving read one definition.
Exam tip

"Several teams compute the same features differently and models disagree in production" points to Feature Store with one shared definition, not to more documentation.

Finding and protecting PII

ControlWhat it does
Sensitive Data ProtectionDiscovers and inspects data for PII types, and de-identifies it
De-identification: masking, redactionReplace or remove the value entirely
De-identification: tokenization (pseudonymization)Replace a value with a consistent token so joins still work; format-preserving encryption keeps the shape
Generalization and bucketingReplace exact age with an age range, exact location with a region
Date shiftingMove dates by a random but consistent offset per person
BigQuery policy tags (column-level security)Only authorized groups can read sensitive columns
Dynamic data maskingUsers granted masked read access on a policy tag see masked values instead of the raw data
Row-level securityFilter rows by user or group
IAM least privilege and VPC Service ControlsLimit who and what can reach the data, and block copying it out of the perimeter
Customer-managed encryption keys (CMEK)Control the keys that encrypt stored data

The best protection is data minimization: if a field does not improve the model, drop it before training. Free text such as support notes often hides PII; inspect it, do not assume it is clean.

A worked example

A hospital network wants a readmission model. Records include names, phone numbers, exact birth dates and free-text notes. The engineer runs Sensitive Data Protection inspection on the tables and notes. Names and phone numbers are dropped, patient IDs are tokenized so records still join, birth dates become age bands, and identifiers in notes are redacted.

Only the de-identified tables are registered in Feature Store. The raw tables stay in a separate project inside a VPC Service Controls perimeter with policy tags on sensitive columns.

Raw recordsInspectSensitive Data ProtectionDe identifydrop, tokenize, bucketFeature tablesFeature Store

How the exam asks about this

  • "Fraud features are needed for training in BigQuery and for online prediction within milliseconds, with one definition." Register the BigQuery features in Feature Store and serve them through a feature view in an online store.
  • "Data scientists must join records by customer without seeing real customer IDs." Tokenize the IDs with Sensitive Data Protection (pseudonymization).
  • "Analysts may query a table, but only the privacy team may see the email column." Apply a BigQuery policy tag to the column.

What to remember for the exam

  • Feature Store uses BigQuery as the offline store; register tables or views as feature groups.
  • Feature views sync selected features into an online store for low-latency serving.
  • A feature timestamp enables point-in-time correct training data and prevents leakage.
  • Sensitive Data Protection discovers, inspects and de-identifies PII.
  • Tokenize to keep joins; mask, redact or drop to remove; bucket to generalize.
Watch out

Removing direct identifiers is not always enough. Combinations such as postcode, birth date and gender can re-identify people; generalize these quasi-identifiers too.

Common mistakes

Computing features separately for training and serving. Two code paths drift and cause training-serving skew; serve the registered feature through Feature Store.

Encrypting when the model needs joins. Random encryption breaks joins; deterministic tokenization keeps them.

Trusting free-text fields. Notes and comments often contain names and numbers; inspect them before training.

Check yourself

  • What is the offline store in the current Feature Store?

    BigQuery; features are registered from BigQuery tables or views rather than copied into a separate store.

  • Why does a feature group need a feature timestamp for training?

    It lets training data use only feature values that were true at each label's time, which keeps the data point-in-time correct and avoids leakage.

  • Which de-identification method keeps records joinable?

    Tokenization (pseudonymization), which replaces each identifier with a consistent token.

Topic 2 of 4 in Collaborating within and across teams to manage data and models

Test yourself on Collaborating within and across teams to manage data and models

The full Google Cloud Professional Machine Learning Engineer question bank has 749 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Google Cloud. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.