Teradata ML Engine Analytic Function Execution SQL Syntax

Teradata® Vantage User Guide

brand
Teradata Vantage
prodname
Teradata Vantage
vrm_release
1.0
category
User Guide
featnum
B700-4002-098K
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
For information on the select options, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
table_name
For information, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
correlation_name
For information, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
subquery
For information, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
derived_table_name
For information, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
column_name_list
For information, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.
analytic_function
The name of the Teradata ML Engine function to be run. For information on Teradata ML Engine functions, 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. For rules about when an alias is required, 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
For information on the other options available, see the description of SELECT statements in Teradata® Database SQL Data Manipulation Language.

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