Exam4Training

Under these conditions, how does data flow to the outputs?

You have a tMap component configured with a single input row1 and three outputs: CA, NY, Rejects.

The input row1 consists of two columns.

Name and State, containing the following data:

All outputs map only the Name column from row1, but CA employs a filter expression, CA.equals(row1.state), while Ny employs a filter expression, NY. Equals (row1, State). All Rejects have no such configuration.

Under these conditions, how does data flow to the outputs?

A. CA:Thomas Coolidge Andrew TyalorlNY;Calvin Adams;rejects;none

B. CA:Thomas Coodge;Calvin Adams; rejects:Andrew Taylor

C. CA:Thomas Coolidge;Ny:Calvin Adams;rejects:Thomas Coolidge, adrew taylor, Calvin Adame

D. CA:Thomas Coolidge, Andrew Taylor;Ny:Calvin Adams; rejects:Thomas Coolidge, Andrew Taylor,Calvin Adams

Answer: B

Explanation:

The tMap component allows you to configure multiple outputs for your data transformation and mapping. You can apply filter expressions on each output to filter out the rows that meet certain criteria. For example, if you want to send only the rows that have CA as the state value to one output, you can use CA.equals(row1.state) as the filter expression for that output. The filter expression evaluates to true or false for each row, and only the rows that evaluate to true are sent to the output. In this case, only Thomas Coolidge and Andrew Taylor have CA as their state value, so they are sent to the CA output. Similarly, only Calvin Adams has NY as his state value, so he is sent to the NY output. The Rejects output has no filter expression, so it receives all the rows from the input by default. However, since there is a conflict between the CA and NY outputs and the Rejects output, only the rows that are not sent to any other output are sent to the Rejects output. In this case, there are no such rows, so the Rejects output receives no data.

Reference: Talend Open Studio: Open-source ETL and Free Data Integration | Talend,

Exit mobile version