Pivot Arguments - Aster Analytics

Teradata AsterĀ® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Published
September 2017
Language
English (United States)
Last Update
2018-04-17
dita:mapPath
uce1497542673292.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1022
lifecycle
previous
Product Category
Software
SchemaName
[Optional] Specifies the schema of the input table. Default: PUBLIC.
PartitionColumns
Specifies the same columns as the PARTITION BY clause (in any order).
NumberOfRows
[Required if you omit PivotColumn.] Use NumberOfRows when no column contains pivot keys, but you can specify a maximum number of rows in any partition. The function pivots the input rows into this number of columns in the output table.

If a partition has fewer than number_of_rows rows, the function adds NULL values; if a partition has more than number_of_rows rows, the function omits the extra rows.

If you use NumberOfRows, you must use the ORDER BY clause to order the input data; otherwise, the contents of the output table columns may vary from run to run.

PivotColumn
[Required if you omit NumberOfRows.] PivotColumn specifies the name of the input column that contains the pivot keys.

If pivot_column contains numeric values, the function casts them to VARCHAR; function performance improves slightly if you specify NumericPivotKey ('true').

PivotKeys
[Optional] Use this argument only with the PivotColumn argument, to specify the values in pivot_column to use as pivot keys. The function ignores rows that contain other values in pivot_column.

Default behavior: The function uses every unique value in pivot_column as a pivot key.

NumericPivotKey
[Optional] Use this argument only with the PivotColumn argument. If pivot_column is numeric, NumericPivotKey ('true') improves function performance slightly. Default: 'false'.
TargetColumns
[Optional] Specifies the names of the target columns (input columns that contain the values to pivot).