You can only use an imported ONNX model with an object table when you use capacity-based pricing through reservations. On-demand pricing isn't supported.
Example
The following example imports an ONNX model into BigQuery as a BigQuery model. The example assumes that there is an existing ONNX model located at gs://bucket/path/to/onnx_model/*.
Error: ONNX model output 'output_probability' has unsupported ONNX type: ONNX_TYPE_SEQUENCE.
Error: ONNX model output 'output_probability' is a list of dictionaries, which is not supported in BigQuery ML.
Resolution: If you convert the ONNX model from a scikit-learn classifier by using sklearn-onnx, set the converter option to zipmap=False or zipmap='columns' in order to not output a list of dictionaries for the probabilities. A list of dictionaries is converted to a sequence of map of tensors in ONNX, and BigQuery ML doesn't support sequences in ONNX. For more information, see Choose appropriate output of a classifier.
What's next
Check the ONNX tutorial on GitHub for converters you can use to convert your pre-trained models to ONNX format.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["The `CREATE MODEL` statement enables the import of Open Neural Network Exchange (ONNX) models into BigQuery for machine learning tasks."],["The syntax for importing an ONNX model requires specifying the `MODEL_TYPE` as 'ONNX' and providing the Cloud Storage URI of the model using the `MODEL_PATH` option, and optionally the `KMS_KEY_NAME`."],["BigQuery ML supports the ONNX Tensor type for model input and output columns, with specific BigQuery data type mappings available for various ONNX tensor element types such as INT, FLOAT, BOOL, and STRING."],["Imported ONNX models can only be used with the `ML.PREDICT` function and are limited to a maximum size of 450 MB, and must be in `.onnx` format."],["ONNX models converted from scikit-learn classifiers using sklearn-onnx must have the `zipmap` option set to `False` or `'columns'` to avoid unsupported output types."]]],[]]