ONNXPredict Syntax | Vantage BYOM - 3.0 - ONNXPredict Syntax - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Product
Teradata Vantage
Release Number
3.0
Published
May 2022
Last Update
2022-06-02
Content Type
User Guide
Publication ID
B700-1111-051K
Language
English (United States)

When Model Contains Only One Model

SELECT * FROM [schema.]ONNXPredict(
ON table|view|query [ as InputTable ]
ON table|view|query [ as ModelTable DIMENSION ] //current model
USING
Accumulate(column|columns|'*')
[ ModelInputFieldsMap('onnxInputname=column_names|column_range' [,...] ) ]
[ ShowModelInputFieldsMap({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
[ ModelOutputFields(modelOutputField|modelOutputFields) ]
[ OverwriteCachedModel(current_cached_model_name|'*'|'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0')]
) as alias ;
The syntax of column_range is:
'start_column:end_column'
The range includes endpoints. The start and end columns can be one of the following:
  • Column names (for example, 'column1:column2')

    Column names can only contain letters in the English alphabet, digits, and special characters.

  • Nonnegative integers that represent the indexes of columns in the table (for example, '[1:5]')

    Since the first column has index 1, '[1:5]' specifies the first five columns in the table.

  • Empty

    For example:

    • '[:4]' specifies all columns up to and including the column with index 4
    • '[4:]' specifies the column with index 4 and all columns after it
    • '[:]' specifies all columns in the table

When Model Table Contains Multiple Models

SELECT * FROM [schema.]ONNXPredict (
ON { table | view | (query) } as InputTable
ON (SELECT*FROM [table | view | {query}) WHERE model_id = model_identifier) [ AS ModelTable ] DIMENSION
USING
Accumulate(column|columns|'*')
[ ModelInputFieldsMap('onnxInputname=column_names|column_range' [,...] ) ]
[ ShowModelInputFieldsMap({'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0'}) ]
[ ModelOutputFields(modelOutputField|modelOutputFields)  ]
[ OverwriteCachedModel(current_cached_model_name|'*'|'true'|'t'|'yes'|'y'|'1'|'false'|'f'|'no'|'n'|'0')]
) as alias ;