Skip to main content Skip to complementary content
Close announcements banner

Configuring a tMap component filter by years

The tMap component provides many possibilities of joining and filtering your data, including numerically.

About this task

For the sake of demonstration, this tutorial uses metadata definition: movies 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.
  5. Click Finish.

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

Procedure

  1. Drag-and-drop the movies 0.1 metadata on the Designer.
    1. 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. Double-click the tMap component.
    You are brought to the tMap component configuration window.
  5. On the right side of the screen, click Add output table.
    1. Enter moviesFromThe90s.
    2. Click OK.
  6. In input table row1, select all columns then drag-and-drop them in output table moviesFromThe90s.
  7. In output table moviesFromThe90s, click Enable/disable expression filter.
    1. Drag-and-drop the releaseYear column in the expression filter field of output table moviesFromThe90s.
      You get the following expression: row1.releaseYear.
    2. Enter >=1990 after row1.releaseYear.

Results

You have configured a numeric filter in the tMap component, allowing you to automatically sort a category of data.

What to do next

Create another output table: moviesFromThe80s. You can easily create a double condition by using the Java && operator (AND): row1.releaseYear >=1980 && row1.releaseYear <1990.

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!