{scrollbar} |
A hop connects one transformation step or job entry with another. The direction of the data flow is indicated with an arrow on the graphical view pane. A hop can be enabled or disabled (for testing purposes for example).
The following topics are covered in this section:
When a hop is disabled in a transformation, the steps that follow the disabled hop are cut off from any data flowing upstream of the disabled hop. This may lead to unexpected results when editing the downstream steps. For example, if a particular step-type offers a "Get Fields" button, clicking the button may not reveal any of the incoming fields as long as the hop is still disabled.
Besides the execution order, a hop also specifies the condition on which the next job entry will be executed. You can specify the evaluation mode by right clicking on the job hop:
Create a new hop between two steps using one of the following options:
Insert a new step into a new hop between two steps by dragging the step (in the Graphical View) over a hop. You will be asked if you want to split the hop. This feature works only with steps that have not yet been connected to another step.
Loops are not allowed in transformations because Spoon depends heavily on the previous steps to determine the field values that are passed from one step to another. Allowing loops in transformations may result in endless loops and other problems.
Loops are allowed in jobs because Spoon executes job entries sequentially. Make sure you don't build endless loops. This job entry can help you exit closed loops based on the number of times a job entry was executed.
Mixing rows that have a different layout is not allowed in a transformation. Mixing row layouts causes steps to fail because fields can not be found where expected or the data type changes unexpectedly.
The "trap detector" provides warnings at design time if a step is receiving mixed layouts:
In this case, the full error report reads:
We detected rows with varying number of fields, this is not allowed in a transformation. The first row contained 13 fields, another one contained 16 : customer_tk=0, version=0, date_from=, date_to=, CUSTOMERNR=0, NAME=, FIRSTNAME=, LANGUAGE=, GENDER=, STREET=, HOUSNR=, BUSNR=, ZIPCODE=, LOCATION=, COUNTRY=, DATE_OF_BIRTH=
Note: This is only a warning and will not prevent you from performing the task you want to do.
Transformation hops display in a variety of colors based on the properties and state of the hop. The following table describes the meaning behind a transformation hop's color:
Hop Color |
Meaning |
---|---|
Green |
Distribute rows: if multiple hops are leaving a step, rows of data will be evenly distributed to all target steps. |
Red |
Copies rows: if multiple hops are leaving a step, all rows of data will be copied to all target steps. |
Yellow |
Provides info for step, distributes rows |
Magenta |
Provides info for step, copies rows |
Gray |
The hop is disabled. |
Black |
The hop has a named target step. |
Blue |
Candidate hop using middle button + drag |
Orange (Dot line) |
The hop is never used because no data will ever go there. |
Red (Bold Dot line) |
The hop is used for carrying rows that caused errors in source step(s). |