First Value - Teradata Warehouse Miner

Teradata Warehouse Miner User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.5
Published
February 2018
Language
English (United States)
Last Update
2018-05-03
dita:mapPath
qhj1503087326201.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

Given a sort expression list, this Ordered Analytical function derives a new column indicating the first value over an ordered “window” of values. When one or more Partition Columns are specified, the first values are determined separately over the rows in each partition.

The standard Rows options that define a “window” of values are available with the First Value function, as described in Windowed Aggregate (Generic). They may be viewed or changed on the Properties panel, as seen below. An additional option, Ignore Null Values, is provided for the First Value functions. When this option is in effect, the first non-null value in the requested “window” is returned by the function. By default, null values are not ignored.

When dragging a First Value function into a variable, the following tree element is created.

Variable Creation > Input > Variables: SQL Elements pane - Ordered Analytical Functions > First Value

Sort expressions can be built up in the Sort Expressions folder, Partition Columns can be built up in that folder. Double-click on First Value, or highlight it and click Properties to set the properties for this function.

Variable Creation > Input > Variables: SQL Elements pane - Ordered Analytical Functions > First Value Properties