Considerations - Teradata Vantage

Teradata Vantage™ User Guide

Product
Teradata Vantage
Release Number
1.1
Published
May 2020
Language
English (United States)
Last Update
2020-05-28
dita:mapPath
ioz1543440393126.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4002
lifecycle
previous
Product Category
Teradata Vantage
  • A query alias name is required for analytic function invocation. In this example, dt is the query alias:
    SELECT * FROM GLM (ON ...) AS dt;
  • Function alias names must correspond to the coprocessor function names for the function. See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003 and Function Alias.
  • The USING keyword is required at the start of the function argument section.
  • Output tables must be prefaced with OUT TABLE and the alias as required by the syntax of the specific function. See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003.
  • Input specified with an ON clause must include any required PARTITION BY, DIMENSION, or ORDER BY clause. See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003.
  • The SQL identifier must not be an Advanced SQL Engine reserved word. Advanced SQL Engine restricted words can be located by using the SELECT * FROM SYSLIB.SQLRestrictedWords command. See Teradata Vantage™ - SQL Fundamentals, B035-1141. If an identifier is a reserved keyword, it must be enclosed in double quotes.
  • The length of a query output alias must not exceed 25 characters. For example, this alias causes an error:
    SELECT * FROM KMeans (
      ON (SELECT * FROM kmeansample) as InputTable
      USING
      OutputTable ('kmeanssample_centroid')
      NumberK ('3')
      Threshold ('0.01')
      MaxIterNum ('10')
    ) AS Long_Function_Name_Alias_Example;
  • In the output_table clause (see output_table in ML Engine Analytic Function Execution SQL Syntax), table_name must not have an embedded double quote or an embedded period.
  • The first column of the SELECT statement cannot be of data type CLOB or BLOB. If it is, error 5660 is generated:
    *** Failure 5660 Cannot create index on LOB columns.
    In some functions, the first output column is appended from the input table (through Accumulate or PartitionColumns arguments). For such cases, either choose a column with a different data type or change the order of columns in the SELECT statement. For example:
    SELECT col2,col1 FROM func_name
    instead of:
    SELECT * FROM func_name
    or
    SELECT col1,col2 FROM func_name
    Another option is to create an output table from the SELECT statement with NO PRIMARY INDEX or an index on a column which is not a LOB column.