ONNXClassification Example: Logits as FLOAT32(2) – Argmax Output - 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
SELECT
    *
from mldb.ONNXClassification(
    on (SELECT id, rev_text AS txt FROM amazon_reviews sample 2)
    on (SELECT model_id, model FROM classification_models WHERE model_id = 'distilbert-base-uncased-finetuned-sst-2-english') DIMENSION
    on (SELECT tokenizer FROM classification_tokenizers WHERE model_id = 'distilbert-base-uncased-finetuned-sst-2-english') DIMENSION
USING
    Accumulate('id')
    OutputFormat('FLOAT32(2)', 'ARGMAX')
    ModelOutputFieldsMap('logits=negative,positive', 'argmax(logits)=am')
) as td
;
 
*** Query completed. 2 rows found. 5 columns returned.
*** Total elapsed time was 2 seconds.
 
id                   negative               positive               am_index    am_value
-------------------- ---------------------- ---------------------- ----------- ----------------------
1353637              1.23476803302765E 000  -9.70530867576599E-001 0           1.23476803302765E 000
1556394              -2.39546513557434E 000 2.44996571540833E 000  1           2.44996571540833E 000