Realtime Functions Examples: Using modelBlob from Table - 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
February 2026
ft:locale
en-US
ft:lastEdition
2026-02-18
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274

PMMLPredictRT

select MLDB.PMMLPredictRT(
    '{"id": 1, "sepal_length": 6, "sepal_width": "2.2", "petal_length": 5, "petal_width": "1.5", "petal_width2": 1.5}',
    'iris_db_rf_model',
    'overwritecachedmodel',
    pmml_models.model
) as jr where pmml_models.model_id = 'iris_db_rf_model';
    
 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.
json report
---------------------------------------------------------------------------------
{"probability(2)":0.9,"probability(1)":0.0,"probability(3)":0.1}
    
+---------+---------+---------+---------+---------+---------+---------+---------+

ONNXPredictRT

SELECT MLDB.ONNXPredictRT(
    '{"float_input_0": 5.1, "float_input_1": 3.5, "float_input_2": 1.4, "float_input_3": 1.4}',
    'ONNX_Predict_ModelRT_1',
    '',
    onnx_models.model,
    ''
) as jr
WHERE onnx_models.model_id = 'iris_db_dt_model';
    
 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.
json report
-----------------------------------------------------------------------------------------------------
{"output_probability":[{"info":{"size":3,"keyType":"STRING","valueType":"FLOAT"},"value":{"1":1.0,"2":0.0,"3":0.0},"type":"ONNX_TYPE_MAP"}],"output_label":["1"]}
    
+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+