Apama 10.3.1 | Apama Documentation | Building and Using Apama Dashboards | Dashboard Function Reference | Tabular Functions | Filter And Extract Matches
 
Filter And Extract Matches
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.
Arguments
This function has the following arguments:
*Table: Table from which matching rows are to be extracted.
*Filter Column Name: Text string specifying the column of Table to be searched for matches.
*Pattern: Text string that is either a simple string that optionally uses * as a wildcard, or a regular expression as described in the Java API documentation for java.util.regex.Pattern.
*Pattern Is Reg Expr: Numerical value (0 or 1) that determines whether the pattern is interpreted as a simple string (that optionally uses * as a wildcard) or as a regular expression. If this argument is 0 (the default), Pattern is interpreted as a simple string. Otherwise, Pattern is interpreted as a regular expression.
*Number of New Columns: Numerical value that specifies the number of new columns to be added to the result table to contain the matching groups extracted from the filter column.
*New Column Names: Text string that specifies the name of each new column. Separate column names with a semicolon.
This function returns a table.
Example
Consider the following arguments:
*Table: Table that includes a Customer Name column.
*Filter Column Name: CustomerName.
*Pattern: * *
*Pattern Is Reg Expr: 0
*Number of New Columns: 2
*New Column Names: FirstName;LastName
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.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.