The ML.FEATURE_INFO function

This document describes theML.FEATURE_INFO function, which lets you seeinformation about the input features that are used to train a model.

For more information about which models support this function, seeEnd-to-end user journeys for ML models.

Syntax

ML.FEATURE_INFO(MODEL `PROJECT_ID.DATASET.MODEL_NAME`)

Arguments

ML.FEATURE_INFO takes the following arguments:

  • PROJECT_ID: Your project ID.
  • DATASET: The BigQuery datasetthat contains the model.
  • MODEL_NAME: The name of the model.

Output

ML.FEATURE_INFO returns the following columns:

  • input: aSTRING value that contains the name of the column in theinput training data.
  • min: aFLOAT64 value that contains the minimum value in theinputcolumn.min isNULL for non-numeric inputs.
  • max: aFLOAT64 value that contains the maximum value in theinputcolumn.max isNULL for non-numeric inputs.
  • mean: aFLOAT64 value that contains the average value for theinputcolumn.mean isNULL for non-numeric inputs.
  • median: aFLOAT64 value that contains the median value for theinputcolumn.median isNULL for non-numeric inputs.
  • stddev: aFLOAT64 value that contains the standard deviation value fortheinput column.stddev isNULL for non-numeric inputs.
  • category_count: anINT64 value that contains the number of categoriesin theinput column.category_count isNULL for non-categorical columns.
  • null_count: anINT64 value that contains the number ofNULL valuesin theinput column.
  • dimension: anINT64 value that contains the dimension of theinputcolumn if theinput column has aARRAY<STRUCT> type.dimension isNULL for non-ARRAY<STRUCT> columns.

Formatrix factorizationmodels, onlycategory_count is calculated for theuser anditemcolumns.

If you used theTRANSFORM clausein theCREATE MODEL statement that created the model,ML.FEATURE_INFOoutputs the information of the pre-transform columns from thequery_statement argument.

Permissions

You must have thebigquery.models.create andbigquery.models.getDataIdentity and Access Management (IAM) permissionsin order to runML.FEATURE_INFO.

Limitations

ML.FEATURE_INFO doesn't supportimported TensorFlow models.

Example

The following example retrieves feature information from the modelmydataset.mymodel in your default project:

SELECT*FROMML.FEATURE_INFO(MODEL`mydataset.mymodel`)

What's next

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.