Approximate Percentile Syntax Elements - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢
TargetColumns
Specify the names of the input columns for which to compute approximate percentiles.

If you specify only one target_column in the ApproxPercentileMap function, you can omit this syntax element in the ApproxPercentileReduce function.

If you specify more than one target_column in the ApproxPercentileMap function, you must specify this syntax element in the ApproxPercentileReduce function. In ApproxPercentileReduce, this syntax element must specify at least one target_column that it specifies in ApproxPercentileMap. Only the target columns specified in ApproxPercentileReduce appear in the output table.

ErrorRate
[Optional] Specify the error (desired accuracy) of the approximation; that the quantile is to be correct within error%. The error must be in the range [.01, 50]. Lower error is more accurate but takes longer to compute.
Default: 1
Percentile
[Optional] Specify the approximate percentiles to compute. Each percentile is an INTEGER.
Default behavior: The function computes the percentiles 0, 25, 50, 75, and 100.
GroupByColumns
[Optional] Specify the names of the input columns by which to group the data.

If you specify this syntax element, the function computes the approximate percentile for each group in each column. For example, if the target columns are State, Town, and Population, the function computes the approximate percentile for the population of each state.

If you omit this syntax element, the function computes the approximate percentile for the entire column. For example, if the target columns are State, Town, and Population, the function computes the approximate percentile for the population across all towns.

To specify this syntax element, you must do so in both the ApproxPercentileMap and the ApproxPercentileReduce functions, and specify each group_column in the PARTITION BY clause.