Database Reference
In-Depth Information
not have tasks that load records for which a lookup value was not found in a
text file. The loading of the
City
table illustrates the above limitation. In the
first step, the transformation tests whether
State
is null or not. The rows that
do not have a null value must be sent in parallel to all the subsequent lookup
tasks, as shown by the icon over the arrows that represent the flows, while
in Integration Services these lookup tasks are cascaded. Note that we need a
dummy task from which the parallel tasks are triggered. A second important
difference between the Integration Services and Kettle implementations is
that in the latter there is no need to explicitly include a union task, since
when a step has multiple input flows, the union of all such flows is performed.
However, this requires that all the fields in the input flows have the same name
and appear in the same order in the rows. For this reason, two different steps
are needed for loading the
City
table in Kettle: one for the records containing
CountryKey
(task
City Load
) and the other for the records containing
StateKey
(task
City Load 2
).
Figure
8.41
shows the transformation that loads the
Customer
dimension
table. Notice that there are two different steps for performing lookups, as
indicated by the different icons: the one that looks for
State
and the other
ones that look for
CityKey
. The former lookup type looks for values
in a single
table
and sends
all
rows in the input flow to the output flow, where null values
are put in the lookup fields when there is no match. After this, in order to
split the flow, we can check if
State
is null. The second type of lookup looks
Fig. 8.41
Load of the
Customer
dimension table
Search WWH ::
Custom Search