Apply formatting to your transformation

Try Pentaho Data Integration and Analytics

Version
9.3.x
Audience
anonymous
Part Number
MK-95PDIA000-11
Follow these steps to clean up the field layout on your lookup stream so that it matches the format and layout of the other stream going to the Write to Database step.
  1. Add a Select Values step to your transformation by expanding the Transform folder and clicking Select Values.
  2. Create a hop from the Lookup Missing Zips to the Select Values step.

    Add hop from Lookup Missing Zips to Select Values
  3. Double-click the Select Values step to open its properties dialog box.
  4. Rename the Select Values step to Prepare Field Layout.
  5. Click Get fields to select to retrieve all fields and begin modifying the stream layout.
  6. In the Fields list, find the # column and click the number for the ZIP_RESOLVED field.
    Use CTRL UP (MacOS, COMMAND UP ) to move ZIP_RESOLVED just below the POSTALCODE field, which is the one that still contains null values.
    Move ZIP_RESOLVED field under POSTALCODES field
  7. Select the old POSTALCODE field in the list (line 20), right-click in the line, and select Delete Selected Lines
  8. The original POSTALCODE field was formatted as a 9-character string. You must modify your new field to match the form. Click the Meta-Data tab.
  9. In the first row of the Fields to alter table the meta-data for section, click in the Fieldname column and select ZIP_RESOLVED. Perform the following steps:
    1. Enter POSTALCODE in the Rename to column.
    2. Select String in the Type column and enter 9 in the Length column.

      POSTALCODE String type and length
    3. Click OK to exit the edit properties dialog box.
  10. Draw a hop from the Prepare Field Layout (Select values) step to the Write to Database (Table output) step.
  11. When prompted, select the Main output of the step option.
  12. Save your transformation.

    Renaming fields workflow example