Supported input feature types

BigQuery ML supports different input feature types for different model types.Supported input feature types are listed in the following table:

Model CategoryModel TypesNumeric types (INT64,NUMERIC,BIGNUMERIC,FLOAT64)Categorical types (BOOL,STRING,BYTES,DATE,DATETIME)TIMESTAMPSTRUCTGEOGRAPHYARRAY<Numeric types>ARRAY<Categorical types>ARRAY<STRUCT<INT64,Numeric types>>
Supervised LearningLinear & Logistic Regression
Deep Neural Networks
Wide-and-Deep
Boosted trees
AutoML Tables
Unsupervised LearningK-means
PCA
Autoencoder
Time Series ModelsARIMA_PLUS_XREG
Note:Matrix Factorization andARIMA_PLUS models have special input feature types. The input types listed forARIMA_PLUS_XREG are only for external regressors.

Dense vector input

BigQuery ML supportsARRAY<numerical> as dense vector inputduring model training. The embedding feature is a special type of dense vector.see theAI.GENERATE_EMBEDDING function for more information.

Sparse input

BigQuery ML supportsARRAY<STRUCT> as sparse input duringmodel training. Each struct contains anINT64 value that represents itszero-based index, and anumeric typethat represents the corresponding value.

Below is an example of a sparse tensor input for the integer array[0,1,0,0,0,0,1]:

ARRAY<STRUCT<kINT64,vINT64>>[(1,1),(6,1)]ASf1

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.