代码改变世界

kettle---用户手册(3:创建hops)

2013-05-18 10:27  很大很老实  阅读(844)  评论(0编辑  收藏  举报

hop是用来吧transformation和job连接起来的。数据流动的方向在hop里是通过箭头表示的。hop可以设置为有效或者无效。

下面介绍主要是以下内容:

Transformation Hops:

如果在转换中,hop是无效的,那么,在数据流方向上,其后的单元将得不到任何数据。从而导致结果是无效的。比如,在无效hop的下一个转换,单击get fields,讲啥都得不到。

job hops

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:

  • "Unconditional" specifies that the next job entry will be executed regardless of the result of the originating job entry.
  • "Follow when result is true" specifies that the next job entry will only be executed when the result of the originating job entry was true, meaning successful execution, file found, table found, without error, evaluation was false, ...
  • "Follow when result is false" specifies that the next job entry will only be executed when the result of the originating job entry was false, meaning unsuccessful execution, file not found, table not found, error(s) occurred, evaluation was false, ..

create a hop

  

Create a new hop between two steps using one of the following options:

    • Drag the Graphical View between two steps while holding down the middle mouse button
    • Drag the Graphical View between two steps while pressing the <SHIFT>key and using the left mouse button
    • Right click and select New Hop to select two steps in the tree
    • Use <CTRL> + left-click to select two in the graphical view; the right-click on the step and choose New Hop

Mixing Rows-Trap Detector

hop的颜色标识

Hop ColorMeaning
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).