Skip to main content Skip to complementary content

Configuring a tMap component to join two data sources

The tMap component allows you to transform and route data from single or multiple sources to single or multiple destinations. In this case, discover how to join two data sources.

About this task

For the sake of demonstration, this tutorial uses two different metadata definitions: movies 0.1 and directors 0.1. To follow this tutorial, you can:
  1. Download the following file: metadata_movies_directors.zip.
  2. In the Repository, expand Metadata then right-click File delimited and click Import items.
  3. Select Select archive file: then click Browse to select metadata_movies_directors.zip.
  4. Select movies 0.1 and directors 0.1.
  5. Click Finish.

You can also learn how to create both metadata definitions (see Creating a metadata definition for the tMap component).

Procedure

  1. Drag-and-drop the movies 0.1 and directors 0.1 metadata on the Designer.
    1. In both cases, select a tFileInputDelimited component.
  2. Add a tMap component.
  3. Right-click the movies component.
    1. Select Row > Main
    2. Click on the tMap component to link the two.
  4. Repeat the three previous steps for the directors component.
  5. Double-click the tMap component.
    You are brought to the tMap component configuration window.
  6. On the right side of the screen, click Add output table.
  7. Enter a name for your output table.

    Example

    joinedOutput
  8. Click OK.
  9. In input table row1, select columns movieID, title, releaseYear, url then drag-and-drop them in output table JoinedOutput.
    1. Select column directorID then drag-and-drop it in row2, under Expr. key, next to directorID.
  10. In input table row2, select column directorsName then drag-and-drop it in output table JoinedOutput.
  11. Click OK.
  12. Add a tLogRow component.
  13. Right-click the tMap component.
    1. Select Row > JoinedOutput.
    2. Click on the tLogRow component to link the two.
  14. Optional: In the tLogRow component, select the Table Mode.
  15. In the Run view, click Run.

Results

The tLogRow component displays a table with the joined data of movies 0.1 and directors 0.1.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!