Realtime Functions Examples: Using dbID and filename - Teradata Vantage

Teradata Vantage™ - Bring Your Own Model User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Lake
Product
Teradata Vantage
Release Number
7.0
Published
October 2025
ft:locale
en-US
ft:lastEdition
2025-11-07
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',
    '',
    '00-00-61-04',
    'iris_db_rf_model'
) as jr;
    
 *** 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',
    '',
    '00-00-61-04',
    'iris_db_dt_model',
    ''
) as jr ;
    
 *** 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"]}
    
+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+