User guide
Data Integration with Sybase Avaki Studio 153
Iterator
• Condition: Enter the following code:
// Check to see if we’re at the end of the array
variables.AccountIterator.x <
variables.global.Accounts.length
Configure the Projection operator next (see “Projection” on page 161 for details). Use
the Project All button to pass the results of the input source straight through. Then add
a new column, named ACCOUNT_NUMBER that references the current variable in
the Iterator (you can use the expressions menu to enter it if you like). The expression
should be:
variables.AccountIterator.current
Finally, configure the Input Source parameter mapping (see “Mapping input parame-
ters” on page 144 for details). For the “AccountNumber” parameter, use the expres-
sion:
variables.AccountIterator.current
When you execute this model, the Iterator operator will iterate over the values in the
Accounts array and execute the GetAccountInfo database operation once for each
value, passing the next account number as a parameter. The Projection operator will
then add the ACCOUNT_NUMBER column to the schema. The results of these execu-
tions will be concatenated together and returned as the overall result of the model.