ONNXPredict Example: With Binary Input from a BLOB Column - Teradata Vantage

Teradata Vantage™ - Bring Your Own Model User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Lake
Product
Teradata Vantage
Release Number
20.00
Published
May 2026
ft:locale
en-US
ft:lastEdition
2026-06-18
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274

This example shows how to use a BLOB column as input to ONNXPredict.

The model tf_iris_softmax_onetensor_model expects an input array of four float32 values. The input is named float_input.

Instead of mapping four float columns to this input, you can provide a precomputed input array. If your table contains a float_input column as a BLOB, you can use this column directly as input to the model.

This approach uses binary input and does not require column-to-array mapping.

select * from mldb.ONNXPredict(
    on (select id, float_input from iris_test_binary)
    on (select * from onnx_models where model_id='tf_iris_softmax_onetensor_model') DIMENSION
    using
        Accumulate('id')
) as td
order by 1
;
 *** Query completed. 30 rows found. 2 columns returned. 
 *** Total elapsed time was 1 second.
        id json_report
----------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
         15 {"probability":[[0.9999999,1.7266593E-7,1.2621994E-13]]}
         70 {"probability":[[3.5515524E-5,0.9994023,5.6225434E-4]]}
        130 {"probability":[[2.5531106E-8,0.9915138,0.008486271]]}
...