Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello everyone,
could any one help me below logic.
1. I have two columns a & b.
input : -
a b
hello null
null world
output :-
a b
hello world
how to achieve this output using tmap?
thanks
mahesh
Hi,
An easy way is to assign is to first provide a sequence number for each row and store the output in hash output.
Then read the hash both as main and lookup and left join the row number in main column with row number -1 in lookup flow.
In this way, you will be able to match with both flows and get the output based on NULL check conditions.
Another way is to do it through tjavarow where you can store the data from current record to context variables and compare the data in context variables and main flow using if-else conditions.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
As you're combining 2 rows into 1 and taking the non-null values to form the new row, you could use the tAggregateRow component, with the Aggregate rules for the 2 columns set as "First" and the "Ignore Null Values" option ticked.