Arguments - Aster Analytics

Teradata Aster Analytics Foundation User Guide

Product
Aster Analytics
Release Number
6.21
Published
November 2016
Language
English (United States)
Last Update
2018-04-14
dita:mapPath
kiu1466024880662.ditamap
dita:ditavalPath
AA-notempfilter_pdf_output.ditaval
dita:id
B700-1021
lifecycle
previous
Product Category
Software
Argument Category Description
TargetKey Required Specifies the names of the columns in the edges table that identify the target vertex of an edge.
AllowCycles Optional Specifies whether the input graph can include cycles. The default value is 'false'.
MaxIterNum Optional Specifies the maximum depth to which the function traverses the graph (a nonnegative integer). The default value is 1000.
Output Optional Specifies whether the function outputs all paths ('all') or only paths that end by reaching a leaf vertex, a cycle, or the maximum number of iterations ('end'). The default value is 'end'.
Results Either Results or EdgeResults is required Specifies the aggregate functions that the function calculates along each vertex in each path (refer to the following table). The function outputs one column of results for each aggregate function. The column name is alias, if specified; otherwise it is func(expr).
EdgeResults Either Results or EdgeResults is required Specifies the aggregate functions that the function calculates along each edge in each path (refer to the following table). The function outputs one column of results for each aggregate function. The column name is alias, if specified; otherwise it is func(expr).
FinalEdgeFlag Optional Specifies whether the function includes the edge that follows the final vertex when calculating the functions that EdgeResults specifies. The default value is 'true'.

The following table describes the aggregate functions that the Results and EdgeResults arguments support. In function syntax, expr, expr1, and expr2 are values from the vertices or edges table.

Aggregate Functions Supported by gTree Function
Aggregate Function Description Return Value Data Type
correl(expr1, expr2)
Returns the Pearson product-moment correlation between expr1 and expr2 on the path. DOUBLE PRECISION
count(expr [,...])
Returns the number of vertices in the path where no expr is null. INTEGER
countdistinct(expr)
Returns the number of distinct values of expr in the vertices on the path. INTEGER
current(expr)
Returns the value of expr at the final vertex in the path. Same as input
cycle()
Returns 'true' if the gTree function ends the path by completing a cycle (that is, by visiting a vertex a second time), 'false' otherwise.
Specify this function only in the EdgeResults argument.
BOOLEAN
histogram(expr)
Returns a JSON string that contains the counts of each distinct value of expr on the path. CHARACTER VARYING
leaf()
Returns 'true' if the gTree function ends the path by reaching a leaf vertex (that is, a vertex with no outgoing edges), 'false' otherwise. BOOLEAN
level()
Returns the number of vertices on the path from the root vertex to the last visited vertex. INTEGER
max(expr)
Returns the maximum value of expr over all vertices from the root vertex to the last visited vertex. Same as input
maxiteration()
Returns 'true' if the gTree function ends the path by reaching the maximum number of iterations specified by the MaxIterNum argument, 'false' otherwise. BOOLEAN
mean(expr)
Returns the mean value of expr over all vertices from the root vertex to the last visited vertex. DOUBLE PRECISION
min(expr)
Returns the minimum value of expr over all vertices from the root vertex to the last visited vertex. Same as input
path(expr[,...])
Returns a string that represents the path from the root vertex to the last visited vertex. The string has the form 'v1->v2->v3...' for a vertex path and '.-v1->.-v2->.-v3->...' for an edge path, where vn is the value of the nth expr. CHARACTER VARYING
propagate(expr)
Returns the value of expr at the root vertex. Same as input
range(expr)
Returns the difference between the minimum and maximum values of expr on the path (max(expr) - min(expr)). Same as input
stdev(expr)
Returns the standard deviation of expr over all vertices from the root vertex to the last visited vertex. DOUBLE PRECISION
sum(expr)
Returns the sum of expr over all vertices from the root vertex to the last visited vertex. Same as input
sumproduct(expr1, expr2)
Calculates the product of expr1 and expr2 at each vertex on the path and then returns the sum of the products. Same as input if expr1 and expr2 have the same type, otherwise numeric