This section applies only to symbols that appear in the Pattern argument, described in Syntax Elements. For information about symbols that appear in the Result argument, refer to Result: Applying Aggregate Functions.
For each symbol definition, col_expr = symbol_predicate AS symbol, the function returns the rows for which col_expr equals symbol_predicate. For example, for pagetype = 'home' AS H, the function returns the first and fourth rows of the following table.
sessionid | clicktime | userid | productname | pagetype | referrer | productprice |
---|---|---|---|---|---|---|
1 | 07:00:10 | 333 | home | www.company2.com | ||
1 | 07:00:12 | 333 | product1 | checkout | www.company2.com | 200.2 |
1 | 07:01:00 | 333 | product2 | checkout | 340 | |
13 | 15:35:08 | 67403 | home | www.company1.com |
The function does not return any row that contains a NULL value. For example, for pagetype = 'checkout' AS C, the function returns the second row of the preceding table, but not the third.
The predicate TRUE matches every row.
If symbols have overlapping predicates, multiple symbols might match the same row.
Boolean Expressions in a Symbol
- When you use Boolean expressions in a symbol, then TRUE, NOT TRUE, and integers are not allowed within parentheses or quotes.
- Teradata Boolean expressions used with AS symbol_name are supported with logical operators as well as parentheses.
Multiple Inputs and Symbols
When using multiple inputs, each symbol must come from one and only one input stream. If the input tables contain columns of the same name, then the column reference in the SYMBOLS clause can be qualified with the table name.