Get the total count of the output of tMap(expression filter) to use in the following tMap component

Highlighted
Seven Stars

Get the total count of the output of tMap(expression filter) to use in the following tMap component

Hi,

 

How to pass the row count of tMap output to another tMap for hashcode mapping?

 

row1: I am reading a file using tFileInputExcel_1.

rowY and rowN: Using tMap expression filter, I am splitting input into 2 datasets based on the input field value('Y' or 'N')

row2: I have connected a tFlowMeter to get the count of the rowY

row3: Is the output of tFlowMeterCatcher.

I have connected tFlowMeterCatcher to tJavaRow component where I have assigned row3.count to globalMap table as below:

 globalMap.put("cnt_rowY", row3.count);

 

Now from tFlowMeter I have connected a tMap component to get the value of globalMap.get("cnt_rowY")

But this always gives me null.

 

I wanted the mod of : ((key.hashCode() & 0x7fffffff) % cnt_rowY). 

How can I achieve this.

 

Thanks

Highlighted
Employee

Re: Get the total count of the output of tMap(expression filter) to use in the following tMap component

Hi,

 

     Could you please share a screen shot of your job flow for better understanding of the scenario?

 

Warm Regards,

 

Nikhil Thampi

Highlighted
Seven Stars

Re: Get the total count of the output of tMap(expression filter) to use in the following tMap component

Hi Nikil,

 

Thank you for responding.

After a long search in google I came to know that splitting the input dataset into 2 datasets, apply transformations and union the 2 datasets into 1 dataset(diamond flow) is not supported in Talend.

 

Could you kindly confirm if my understanding is correct.

If not, I would create a flow and attach it.

 

Thank you

 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog