Tabular Functions
This section lists the Dashboard functions that operate on or return tabular data.
This section lists the Dashboard functions that operate on or return tabular data.
Calculates the sum across cells for each row or column of the specified Table.
If Return Column is 1, the function returns a table with one column. The nth cell of the returned column contains the sum of the numerical cells in the nth row of the table specified by the argument Table. (If there are no numerical cells in the row, the returned cell contains 0.)
If Return Column is 0, the function returns a table with one row. The nth cell of the returned row contains the sum of the numerical cells in the nth column of the table specified by the argument Table. (If there are no numerical cells in the column, the returned cell contains N/A, by default—but see the argument Result Label Column, below.) The nth column of the returned one-row table is labeled with the label of the nth column of the table specified by the argument Table.
This function has the following arguments:
This function returns a table.
The second table below is attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
Returns a table that includes a column reflecting the sum of two specified columns of a specified table, the sum of a specified value and a specified column, or the sum of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of adding the corresponding row’s cell in First Column Name or Numeric Value to the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of adding the corresponding row’s cell in the specified column to the specified numeric value.
In case 3, each cell of the returned column contains the sum of the two specified numeric values.
In the returned table, the sum column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Calculates the average across cells for each row or column of the specified Table.
If Return Column is 1, the function returns a table with one column. The nth cell of the returned column contains the average of the numerical cells in the nth row of the table specified by the argument Table. (If there are no numerical cells in the row, the returned cell contains 0.)
If Return Column is 0, the function returns a table with one row. The nth cell of the returned row contains the average of the numerical cells in the nth column of the table specified by the argument Table. (If there are no numerical cells in the column, the returned cell contains N/A, by default—but see the argument Result Label Column, below.) The nth column of the returned one-row table is labeled with the label of the nth column of the table specified by the argument Table.
This function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the average of two specified columns of a specified table, the average of a specified value and a specified column, or the average of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of computing the average of the corresponding row’s cell in First Column Name or Numeric Value and the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of computing the average of the corresponding row’s cell in the specified column and the specified numeric value.
In case 3, each cell of the returned column contains the average of the two specified numeric values.
In the returned table, the average column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Calculates a baseline average of the values in the specified table over the specified number of specified date part intervals, and offsets the timestamp to a specified reference time.
The function has the following arguments:
The function returns a table.
The trend graph below is attached to the function defined by the following dialog. In the trend graph, the thin, light blue line is the baseline, the average of the data over three one-week periods. The dark blue line is the current data. The first table’s data table is attached to the argument Table. The second table shows the baseline data. Note that the current data for Sunday is lower than the rest of the current data. The graph shows that this is not anomalous, since the baseline data for Sunday is also lower than the rest of the baseline data.
Appends all rows of the input table to a buffer table that contains rows from previous updates. Returns the buffer table.
This function is useful for buffering a table argument to another function in cases where the updates to the table may arrive rapidly (for example, from an event-driven data source), in order to ensure that the other function receives all rows.
The function has the following arguments:
This function returns a table.
Returns the result of combining two specified tables into a single table.
When Combine Rows is 0, the result contains the columns from Table 1 followed by the columns from Table 2. Each result row consists of the nth row from Table 1 followed by the nth row from Table 2. If Table 1 and Table 2 have a different number of rows, trailing result rows are padded with cells that are contain 0 or the empty string.
When Combine Rows is 1 and Ignore Column Names is 0, the result contains the rows from Table 1 followed by the rows from Table 2. The result table contains the column labels from Table 1 followed by the column labels that appear only in Table 2. In the result table, 0 or the empty string appears in cells that are in rows from one table and in a column that appears only in the other table.
When Combine Rows is 1 and Ignore Column Names is 1, the result contains the rows from Table 1 followed by the rows from Table 2. The result table contains only columns that appear in both Table 1 and Table 2.
This function has the following arguments:
This function returns a table.
The third table below is attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table 1, and the second table’s data table is attached to the argument Table 1.
Creates a string concatenation of the values in the given table columns separated by the given character(s), and returns the results in a new table column. The column names are specified as a semicolon-separated string. The separator can be a single character such as . or / but it can also be a string such as and.
This function has the following arguments:
This function returns a table.
Returns a copy of the specified table that is modified by converting the specified columns to the specified types.
When converting from numeric types (other than Long) to the Time type, columns are first converted to Long and then to Time. If a String column entry cannot be parsed as a Time, the resulting entry is blank.
The function has the following arguments:
This function returns a table.
The second table below is attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
Copies the specified Table.
The function has the following argument:
This function returns a table.
Returns the number of rows in the specified table.
The function has the following argument:
This function returns a numeric value.
Divides a specified range of values into a specified number of bands and counts the number of rows in a specified data table column that contain a value that lies within each band.
If Return Cumulative Percents is set to 0, this function returns a table containing one column that holds the midpoint values of each band (one row for each band), as well as one column containing the counts.
If Return Cumulative Percents is set to 1, the returned columns will contain the cumulative percentage of the total count in each cell, rather than the individual counts.
The function has the following arguments:
false
and 1 for true
) that determines whether the range of values is specified by Min Value and Max Value, or by the values in Table.This function returns a table.
Returns a table that lists unique values and their counts from the specified table column.
The function has the following arguments:
This function returns a table.
Returns a table that lists unique values and their counts from a specified table, sorted by a specified number of specified date part Intervals. The Table must contain a time column and a value column. The returned table contains an interval column, a column for each unique value, and counts for number of intervals specified or for all data in the Table if the Number of Intervals is 0.
The function has the following arguments:
SimpleDateFormat
class.This function returns a table.
Returns a two column table containing selector names and their corresponding values to be presented in a dropdown list. The first column contains selector names and the second column contains their values. The returned table consists of the first two columns of a specified table, optionally modified by sorting, and with the optional addition of a row that contains a specified selector name in the first column and the value * in the second column. If the input table has only one column its contents are used for both the selector names and values.
This function has the following arguments:
This function returns a table.
Returns a table that includes a rate-of-change column as well as a delta column for each specified data column. The function returns a table including, for the specified columns, new values for the difference between this update and the previous, along with the rate of change per second. The new values may be appended to the input table in columns named by prefixing Delta and Rate to the column name, or the delta columns may replace the corresponding input columns (the rate columns will still be appended to the table).
This function has the following arguments:
This function returns a table.
Computes the delta between incoming rows of tabular data. This function returns a table that includes, for the specified columns, new values for the difference between the current update and the previous update.
The function has the following arguments:
This function returns a table.
Returns a table with a single column that lists all unique values from a specified column of a specified table.
This function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the quotient of specified columns of a specified table, the quotient of a specified value and a specified column, or the quotient of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of dividing the corresponding row’s cell in First Column Name or Numeric Value by the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of dividing the corresponding row’s cell in the specified column by the specified numeric value.
In case 3, each cell of the returned column contains the quotient of the two specified numeric values.
In the returned table, the quotient column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a copy of a specified table, modified where necessary to guarantee that given columns have specified types.
The function has the following arguments:
This function returns a table.
Returns a copy of a specified table, supplemented if necessary to include a timestamp column with a specified name. The added column is filled with the current time.
The function has the following arguments:
This function returns a table.
Returns the result of evaluating a specified expression for each row of a specified table. The specified expression contains variables, each of which has an associated column of the specified table.
The returned table has all the columns of the specified table, followed by a column that contains the evaluation results. The nth row of the results column contains the result evaluating the expression with values from the nth row of the specified table substituted for expression variables.
Boolean true
and false
values are returned as 1.0 and 0.0 respectively.
The function has the following arguments:
If a value whose form is numeric needs to be treated as a string, for example to serve as an argument to a string function, surround the variable in Expression with double quotes. Variables enclosed in double quotes are always used as strings. An example of such an expression is length("%var1") + %var2.
This function returns a text string.
The second table below is attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
Returns a table containing all rows from a specified table in which the value of a specified column matches a specified pattern. For each matching row, each token from the specified column that matches a group in the pattern is extracted to a new column.
This function has the following arguments:
java.util.regex.Pattern
.This function returns a table.
Consider the following arguments:
In this case, if a row of Table contains Joe Smith in the CustomerName column, the corresponding row in the result table contains Joe in the FirstName column and Smith in the LastName column.
Returns a table containing all rows from a specified table in which the value of a specified column matches a specified pattern.
This function has the following arguments:
java.util.regex.Pattern
.This function returns a table.
Returns a table containing all rows from a specified table in which the values of specified columns matches the values in specified lists of values.
This function has the following arguments:
A row from Table is included in the returned table if and only if the nthFilter Column Name matches a value in FilterValue’s nth list, for all n from 1 to the number of specified column names.
This function returns a table.
Returns a copy of a specified table that contains only those rows in which the value of a specified column falls within a specified time range.
The function has the following arguments:
This function returns a table.
Returns a table containing one of the following:
This function has the following arguments:
The function returns a table.
Returns a copy of a specified table with specified formats applied to specified columns.
This function has the following arguments:
Specify the column format based on the Java format specification, or with the following shorthand: $ for money values, $$ for money values with additional formatting, or () for non-money values, formatted similar to money. For example, if Column Format(s) contains the pair ‘Units Completed’:$, the Units Completed column in the returned table is formatted for money. Both positive and negative formats can be supplied, for example: #,###;(#,###).
The function accepts date/time patterns for formatting columns of type Date. For example consider a column Timestamp with the value Sep 06, 2008 7:27:36 AM. If it is formatted with ‘Timestamp’:‘MM/dd/yyyy’ the result is 09/06 /2008. If it is formatted with ‘Timestamp’:‘hh:mm:ss’ the result is 07:27:36. For the full list of formatting codes, see the Java documentation for the class SimpleDateFormat.
The function returns a table.
Returns a table that contains status information for the data server being used by the current dashboard.
The table has the following columns:
__default
for the default data server, or the name of a named data serverTrue
if the server connection is operational; False
otherwiseOK
if connection is operational, no connection
if there is no connection to the server, or no service
if there is an HTTP connection to the rtvdata
servlet but the servlet has no connection to its data serverrtvdata
servlet or hostname:
port for a direct socket connection to a data serverThe function has no arguments.
This function returns a table.
Returns a table that contains a summary of all the data in a given table, aggregated over time. The summary data in the returned table is grouped into a specified number of specified time intervals over a specified time range.
The function has the following arguments:
This function returns a table.
Returns a table that contains a summary of all the data in a given table, aggregated over both time and index columns. The summary data in the returned table is grouped into specified time intervals, with a further breakdown by unique values in specified index columns.
The function has the following arguments:
This function returns a table.
Returns a table that contains a summary of all the data in a given table. The summary data in the returned table is grouped by unique values in specified index columns.
The function has the following arguments:
This function returns a table.
The pie graph and the second table below are attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
The bar graph and the second table below are attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
Returns the result of performing an inner join of two specified tables on specified columns. The result contains all columns from Left Table followed by all columns from Right Table, and contains all rows for which the value in Left Column exactly matches the value in Right Column. Left Column Name and Right Column Name can each specify a semicolon-separated list of n column names, in which case a match occurs if the ith value in Left Column Name exactly matches the ith value in Right Column Name, for all i between 1 and n, inclusive.
The function has the following arguments:
This function returns a table.
The third table below is attached to the function defined by the following dialog. The first table’s data table is attached to the argument Left Table and the second table’s data table is attached to the argument Right Table.
Performs an outer join of the Left Table and the Right Table on the columns specified in the Left Column Name and the Right Column Name fields. The joined table contains all columns from the Left Table followed by all columns from the Right Table, and contains all rows where the value in the Left Column exactly matches the value in the Right Column, plus additional rows according to the Outer Join Type, which may be left, right, or full.
In a left outer join, the result table includes all the rows from the left table; in a right outer join it includes all the rows from the right table, and in a full outer join it includes all the rows from both tables. In any row where there is no match for the join column value, the cells from the other table contain null values. (Null values are represented as blank for strings, 0 for integers and longs, NaN
for floats and doubles, and NULL_DATE
for dates.)
Left Column Name and Right Column Name can each specify a semicolon-separated list of n column names, in which case a match occurs if the ith value in Left Column Name exactly matches the ith value in Right Column Name, for all i between 1 and n, inclusive.
For a full join or right join, if the Left Table is null, the result is Right Table. For a full join or left join, if Right Table is null, the result is Left Table. In all other cases the result is null.
The function has the following fields:
This function returns a table.
Returns a table containing one of the following:
This function has the following arguments:
The function returns a table.
Returns a table that results from supplementing a given trend table with special rows that indicate longer-than-expected time intervals between timestamps of adjacent rows of the given trend table. For a trend graph attached to the returned table, the trend line will contain a break (or a specified character) wherever time gaps occurred.
The table is constructed as follows: If the time interval between any two rows in the table is greater than the expected interval, insert 2 new rows between those rows in which the value of each column to be marked is set to NaN or other specified value. (NaN indicates “not a number”. A trend graph will break a trace line when a NaN is encountered). The timestamp of the first new row is set to a value of 1 msec more than the timestamp of the last row before the graph and the timestamp of the second new row is set to a value of 1 msec less than the timestamp of the next row after the gap. It is assumed that the table is sorted by timestamp in ascending order. On the second and subsequent updates of this function, the timestamp of the first row in the table is compared to the timestamp of the last row from the previous update.
This function has the following arguments:
The function returns a table.
Determines the maximum cell value for each row or column of the specified Table.
If Return Column is 1, the function returns a table with one column. The nth cell of the returned column contains the maximum of the numerical cells in the nth row of the table specified by the argument Table. (If there are no numerical cells in the row, the returned cell contains 0.)
If Return Column is 0, the function returns a table with one row. The nth cell of the returned row contains the maximum of the numerical cells in the nth column of the table specified by the argument Table. (If there are no numerical cells in the column, the returned cell contains N/A, by default—but see the argument Result Label Column, below.) The nth column of the returned one-row table is labeled with the label of the nth column of the table specified by the argument Table.
This function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the larger of two specified columns of a specified table, the larger of a specified value and a specified column, or the larger of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the larger of the corresponding row’s cell in First Column Name or Numeric Value and the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the larger of the corresponding row’s cell in the specified column and the specified numeric value.
In case 3, each cell of the returned column contains the larger of the two specified numeric values.
In the returned table, the column that reflects the larger value is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Determines the minimum cell value for each row or column of the specified Table.
If Return Column is 1, the function returns a table with one column. The nth cell of the returned column contains the minimum of the numerical cells in the nth row of the table specified by the argument Table. (If there are no numerical cells in the row, the returned cell contains 0.)
If Return Column is 0, the function returns a table with one row. The nth cell of the returned row contains the minimum of the numerical cells in the nth column of the table specified by the argument Table. (If there are no numerical cells in the column, the returned cell contains N/A, by default—but see the argument Result Label Column, below.) The nth column of the returned one-row table is labeled with the label of the nth column of the table specified by the argument Table.
This function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting one of the smaller of two specified columns of a specified table, the smaller of a specified value and a specified column, or the smaller of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the smaller of the corresponding row’s cell in First Column Name or Numeric Value and the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the smaller of the corresponding row’s cell in the specified column and the specified numeric value.
In case 3, each cell of the returned column contains the smaller of the two specified numeric values.
In the returned table, the column that reflects the smaller value is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the remainder of division performed on specified columns of a specified table, the remainder of division performed on a specified value and a specified column, or the remainder of division performed on two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the remainder of dividing the corresponding row’s cell in First Column Name or Numeric Value by the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the remainder of dividing the corresponding row’s cell in the specified column by the specified numeric value.
In case 3, each cell of the returned column contains the remainder of dividing the first value by the second.
In the returned table, the remainder column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the product of two specified columns of a specified table, the product of a specified value and a specified column, or the product of two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of multiplying the corresponding row’s cell in First Column Name or Numeric Value by the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of multiplying the corresponding row’s cell in the specified column by the specified numeric value.
In case 3, each cell of the returned column contains the product of the two specified numeric values.
In the returned table, the product column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the quotient of specified columns of a specified table, the quotient of a specified value and a specified column, or the quotient of two specified values. Values are expressed as percentages.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result, expressed as a percentage, of dividing the corresponding row’s cell in First Column Name or Numeric Value by the cell in Second Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result, expressed as a percentage, of dividing the corresponding row’s cell in the specified column by the specified numeric value.
In case 3, each cell of the returned column contains the quotient, expressed as a percentage, of the two specified numeric values.
In the returned table, the percent column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a table in which row data from a specified table is rotated into columns.
The function has the following arguments:
This function returns a table.
The bar chart and the second table (labeled Pivot Customer), below, are attached to the function defined by the following dialog. The first table’s data table is attached to the argument Table.
Returns a reference to the specified table without copying the contents.
The function has the following argument:
This function returns a table.
Returns a copy of a specified table with specified columns renamed with specified new names.
The function has the following arguments:
This function returns a table.
Returns a one-column table containing only a specified column from a specified table.
The function has the following arguments:
This function returns a table.
Returns a copy of a specified table, with specified columns modified to use specified types.
The function has the following arguments:
Table: Table from which the column is to be selected.
Column Types: Text string that specifies column-name/type pairs. Separate pairs with spaces. Within each pair, separate column-name from type with a colon, that is, each pair has the following form:
column-name:type
For type, supply one of the following:
apama.timestamp:DATE ‘Max Value’:INTEGER Active:BOOLEAN
This function returns a table.
Returns a table with the same rows as a specified table but with the rows sorted according to the values in a specified column or columns.
If you specify multiple columns, the returned table is sorted on the first column specified, and then on the second column, and so forth.
This function has the following arguments:
This function returns a table.
Returns a table with the result of splitting a given string using a specified separator. The returned table contains one column, with a row for each resulting substring.
The function has the following arguments:
Pattern
class. See the Java API documentation for java.util.regex.Pattern
.This function returns a table.
Returns a table whose cell values are specified by a string that uses specified row and column delimiters.
The function has the following arguments:
String: Text string to be converted into a table.
Row Delimiter: Text string that specifies the delimiter by which the data for one row is separated (in String) from the data for the next row.
Note, if you specify a delimiter that consists of more than one character, those characters are treated as a sequence of delimiters and a new row is created when any one of them is encountered.
Column Delimiter: Text string that specifies the delimiter by which the data for one cell in a row is separated (in String) from the data for the next cell in that row. If the table is to contain only one column, do not specify a value for Column Delimiter.
Note, if you specify a delimiter that consists of more than one character, those characters are treated as a sequence of delimiters and a new column is created when any one of them is encountered.
Column Name Mode: Text string that specifies how the function should determine column names for the returned table. Specify one of the following:
AUTO
is the default setting; leaving this unset or set to a value other than AUTO
, STATIC
, or STRING
defaults to AUTO
.Column Names: Text string that specifies the column names to use in the returned table, if Column Name Mode is Static.
Allow Empty Rows/Columns: Specifies whether or not empty cells will be created when empty tokens in the string are encountered. Setting this argument to “true
” or “1
” means empty cells will be created. For example, in a string that uses “,
” (comma) as a delimiter, a row represented by 1,,,4
will result in a row with 1
in the first column followed by two empty cells, followed by 4
. Setting this to “false
”, “0
”, or leaving it unset (the default) means that empty tokens will be ignored. In this case the “1,,,4
” example will create a row with 1
in the first column, followed by 4
in the second column, followed by two blank columns.
This function returns a table.
Returns a table that contains subtotals for the data in a given table. Subtotals are provided for a specified number of specified time intervals.
The function has the following arguments:
SimpleDateFormat
class. For example, the format EEE, hh:mm a results in a string of the form exemplified by Wed, 05:32 PM. Use q, qqq or qqqq for short, medium or long versions of quarter notation. For example, qqq-yyyy results in a string of the form exemplified by Qtr 1-2005. If no Date Format is given, dates are expressed in the form exemplified by 08/30/03 05:32 PM. If no Date Format is given, the type of the first column in the returned table is Date; otherwise it is String.This function returns a table.
Returns a table that lists all of the unique values found in the first column of a specified table, along with the sum of the values in the corresponding fields of the remaining columns.
The function has the following arguments:
This function returns a table.
Returns a table that includes a column reflecting the difference between two specified columns of a specified table, the difference between a specified value and a specified column, or the difference between two specified values.
In case 1, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of subtracting the corresponding row’s cell in Second Column Name or Numeric Value from the cell in First Column Name or Numeric Value.
In case 2, the nth cell in the returned column corresponds to the nth cell of the table specified by the argument Table. Each cell of the returned column contains the result of subtracting the specified numeric value from the corresponding row’s cell in the specified column.
In case 3, each cell of the returned column contains the subtracting the second specified value from the first.
In the returned table, the sum column is preceded by copies of all the columns in Table.
The function has the following arguments:
This function returns a table.
Returns a copy of the specified Table with a new boolean column containing a value of true
for each row where the value in the Comparison Column is contained in the one and only column of the Comparison Table.
This function has the following arguments:
This function returns a table.