Referencing Extract tables in raw SQL queries

You can reference an Extract table in downstream processes via raw SQL using the <Extract> token. Use this token to specify subsets of data for subsequent processing, which can improve performance when working with large tables.

The following example queries an Extract table to select the customer IDs of all customers whose account balance exceeds $1,000.

Select p.CUSTOMERID from USER_TABLE p, <Extract> where p.CUSTOMERID = <Extract>.CUSTOMERID group by p.CUSTOMERID having sum(p.BALANCE) > 1000

For flowcharts containing multiple Extract processes, the <Extract> token always refers to the latest available Extract table.

Note: After a Merge, the <Extract> token may or may not be valid. Test run the flowchart to determine if the token works as expected.