Enclosing Context - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

The Enclosing context is used by loop expressions associated with aggregate functions (those functions starting with "Ag"). Normally this type of looping is done within the current output map element's looping. For example, if you have a loop in the output for an invoice, and you want to calculate the total of all of the line items, you use the AgSum function and simply specify a loop on the line items. It will automatically assume you want only line items from the enclosing invoice. However, if you want to include line items from other invoices, use the enclosing context to specify a loop higher than the invoice (the root output element in this case), and then the AgSum function will look at all line items of all invoices.