ML Engine Analytic Function Execution SQL Syntax - 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
SELECT select_options
FROM { 
  table_name [ [ AS ] correlation_name ] |
  join | 
  ( subquery ) [ AS ] derived_table_name [ ( column_name_list ) ] |
  table_function |
  table_operator |
  analytic_function [ AS ] correlation_name
} [, ...]
other_options

Syntax Elements

select_options
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
table_name
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
correlation_name
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
subquery
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
derived_table_name
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
column_name_list
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.
analytic_function
The name of the ML Engine function to be run. See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003.
analytic_function_name (on_clauses [ output_table ... ] [ USING function_arguments ] )
on_clauses
on_clause [ on_clause... ]
on_clause
{ partition_any_input | partition_attributes_input | dimensional_input }
Provides the input data on which the function operates. This data is composed of one or more partitioned inputs and zero or more dimensional inputs.
partition_any_input
table_input [ PARTITION BY ANY [ ORDER BY order_expr_list ] ]
Expressions that partitions the input data before the function operates on it.
partition_attributes_input
table_input PARTITION BY expr_list [ ORDER BY order_expr_list  ]
Expressions that partition the input data before the function operates on it.
dimensional_input
table_input DIMENSION [ ORDER BY order_expr_list  ]
Expressions that replicates the input data to all nodes before the function operates on it.
table_input
ON table_expression [ [ AS ] alias ]
Includes an alias for the table_expression. See the description of rules for table alias in the Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003.
order_expr_list
 order_expr [ , … ]

SQL expression on which to sort rows going into the function. The expression can specify the numeric position of the expression in the expression list with a name or constant.

order_expr
 expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]

Each order_expr can be specified to sort either ascending (ASC) or descending (DESC). Ascending order is the default. Each order_expr can specify whether null values appear before (NULLS FIRST) or after (NULLS LAST) non-null values. By default, null values sort as if larger than non-null values (NULLS FIRST is default for DESC order and NULLS LAST is default for ASC order).

table_expression
{ table_name | (subquery) | analytic_function }
table_name
Name of a table, queue table, derived table, or view.
output_table
OUT TABLE alias (table_name)
subquery
A SELECT expression that is nested within another SQL statement or expression.
other_options
See the description of SELECT statements in Teradata Vantage™ - SQL Data Manipulation Language.

See Teradata Vantage™ Machine Learning Engine Analytic Function Reference, B700-4003 for information on semantic requirements for ML Engine analytic functions.