[resolved] Doing multiple join using tmap

One Star

[resolved] Doing multiple join using tmap

Hi guys,

I have attached screenshot of my job and both tmaps.

row2(main) is the main table for which i want all the rows, (3 columns, 15k records). After that i added tmap_1 and a lookup table which gave me 1 matching row for a column. So its output became (15k + records, 4 columns with last column having value for only 1 row) --> Simple Left Join.
This worked perfectly fine and got desired output.

After this I added 1 more lookup query from which i again wanted 1 column (row1 - 10k records). So i added tmap_2, and joined it with tmap_1. Expected output was a table with 5 columns and 15k records.
3 columns --> 1st table (row2)
4th column --> 1 value, rest all null (row3)
5th column --> 10k rows with value, rest null(monthly_repost_used)

So its more like 2 left outer join which i have done. I have also attached 2 tmap editor.
Problem is row2 somehow shows only 1 row and then tmap_2 fails. Not sure why. row2 should not show 1 row as its left outer join. It has 15k records


Five Stars

Re: [resolved] Doing multiple join using tmap

You have your aggregated data as your look-up, so this will happen first.
The main flow that is only showing 1 record is doing this because the tMap is probably failing on the first row.
I can only guess that the tMap is failing on the assignment of the last output field. You add two values together. I'd think that one or both of these are null. This will happen as you're outer-joining, so must expect some null values.
You need to null-test.

e.g.
row2.value == null ? row1.value : row1.value == null ? row2.value : row1.value + row2.value
One Star

Re: [resolved] Doing multiple join using tmap

Yes. That was the case. Thanks a ton.. Smiley Happy

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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog