Definition of activity and operation loops
Application Database > Analytical Workspace > (Data transformation package tab) DTP tile > DTP tile >
> Loop
Application Database > Navigation Panel > Analytic Information Hub > workspace tile > (Data transformation package tab) DTP tile > DTP tile >
> Loop
Purpose of the page¶
This page allows you to define loops for the activities or operations of a DTP, in case you want to run them several times.
Loop Field Attributes Tab
In the Attributes tab, fields can be defined.
| Field | Description |
|---|---|
| Loop Code | Mandatory, the loop code of one or more activities or operations of the DTP. |
| Description | Loop description, you will find all languages defined for that user. The description field 0 is mandatory. |
| List of values | Text field containing the query to retrieve the list of values. |
IMPORTANT:
for the List of Values field:
- the maximum number of values the system can handle is 99.
- for CCH Tagetik to resolve an explicit list without generating an error, a query must be specified as in the examples below.
- one or more fields may be specified, for each field an alias may also be specified.
Example 1
select 'A'
UNION select 'B'
UNION select 'C';
Example 2
select 'January' as month, 'Monday' as day, 'JM' as cod
UNION select 'February' as month, 'Monday' as day, 'FM' as cod
UNION select 'March' as month, 'Monday' as day, 'MM' as cod;
WARNING:
To define the order of execution of the DTP activities, the system considers the MIN(level) of all activities belonging to the loop as the 'loop level'. Regardless of the result of the run condition.
Whereas, there is no "loop level" for the operations loop as the operations have no level. In this case, loops of several operations can only contain consecutive operations, whereas if the same loop is referenced by non-consecutive operations, these operations will be run in separate loops.
Execution¶
- The activity loop always runs separate from any other parallel activities.
- Within the loop, all activities run in series. The order of execution is defined by the level (0 has higher priority) and with the same level it is not possible to determine the order of execution a priori.
- In the event that the query entered in the List of Values field does not deliver any results, the system does not execute the activities of that loop and the Loop information message is written in the audit, which was not run because that list is empty.
- The maximum number of operations that can be executed by a task containing loops of operations is 99.