Databases Reference
In-Depth Information
8.
Right-click on the delimited input component, select
Row | Main
, and drop
the connector onto the denormalize component.
9. In the
Component
tab of the denormalize component, click on
Sync columns
to copy the schema from the delimited component to the denormalize
component. The output from the denormalize component will be a
comma-separated string as noted previously, so we also need to modify
the datatype of the
product_id
field from integer to string.
10. We now need to configure the denormalize element. In the
To denormalize
box, click on
+
to add a new row to the table. By default, it will show the
first field in the schema (in our case,
product_id
, the
only
field in the schema,
so we can leave this as it is). The
Delimiter field
is shown as a semi-colon.
This is the output delimiter and we want this to be a comma in our output,
so modify this to
","
accordingly. The final column in the table is
Merge
same value
. If this is checked, then duplicate values in the input data will be
merged, so that only one occurrence is output; if unchecked, then duplicate
values will remain. In our case, it makes sense for duplicate values to be
merged, so we can check the checkbox.
11. From the
Metadata section in the Repository window
, drop the products
table metadata onto the Job Designer, selecting
tMySQLInput
from the
resulting pop-up window.
Search WWH ::
Custom Search