Integrate two tHashOutputs and merge into one tHashInput

Four Stars

Integrate two tHashOutputs and merge into one tHashInput

Hi,
 I'm wanting to take contents of two tHashOutput and merge into one thashInput, I've logged there output to the console as follows;
.-----------------------------------------------------------------------.
|                               tLogRow_4                               |
|=---------------------------------------------------------------------=|
|error                                                                  |
|=---------------------------------------------------------------------=|
|FIELD_CUSTOM_VALIDATION_EXCEPTION:Cannot be blank.:BillingPostalCode --|
|FIELD_CUSTOM_VALIDATION_EXCEPTION:Cannot be blank.:BillingPostalCode --|
|FIELD_CUSTOM_VALIDATION_EXCEPTION:Cannot be blank.:BillingCountry --   |
|FIELD_CUSTOM_VALIDATION_EXCEPTION:Cannot be blank.:BillingPostalCode --|
'-----------------------------------------------------------------------'
.--------------+---------+------------------+-----------------------+-------------+-------------.
|                                           tLogRow_7                                           |
|=-------------+---------+------------------+-----------------------+-------------+------------=|
|StatusCodeResp|smsId    |crmId             |crmAccName             |errorRespMesg|timeStamp    |
|=-------------+---------+------------------+-----------------------+-------------+------------=|
|200           |150017720|001O000000lttjbIAA|Davis Wiremu Humphreys |             |1441846527149|
|200           |150017726|001O000000ltggSIAQ|Daniel Josiah Humphreys|             |1441846530300|
|200           |150017728|001O000000lt4eLIAQ|Henry Jones            |             |1441846531192|
|200           |150017729|001O000000lttl8IAA|Michael Andrew Tito    |             |1441846531707|
'--------------+---------+------------------+-----------------------+-------------+-------------'
I need to put the contents of tlogRow_4 into the "errorRespMesg" column of tLogRow_7, in the order that they are presented.
Thanks,
Synfield.
Highlighted
Sixteen Stars

Re: Integrate two tHashOutputs and merge into one tHashInput

A tMap would help you with this, but you seem to be missing a key on the tLogRow4 side. If you can control the order, then you could add a numeric column to both and use that for a simple inner join within the tMap.
Community Manager

Re: Integrate two tHashOutputs and merge into one tHashInput

Hi 
To merge two data flow from different data source, you can use tUnite Component. You may need to unite column name before merging the data.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Sixteen Stars

Re: Integrate two tHashOutputs and merge into one tHashInput

That was not the question Shong. They want to join the two data sets to result in 4 rows, not union the two datasets.
Four Stars

Re: Integrate two tHashOutputs and merge into one tHashInput

Thanks, Shong and rhall_2.0.
Yes I was using tmap and thought about adding id columns in the two input schemas, but couldn't get the increment expression to work in tmap for these two inputs.
I'm only able to add an expression in the 'lookup' schema input.
I tried using "Numeric.sequence("s1",1,1)", but couldn't get it to work.
What is the best way to achive this?
Thanks.
Four Stars

Re: Integrate two tHashOutputs and merge into one tHashInput

I've Manged to solve it, but not sure if this is the most efficient way?

 
 


Community Manager

Re: Integrate two tHashOutputs and merge into one tHashInput

Understand your question right now, as rhall_2.0 suggested, you achieve it in the right way .
----------------------------------------------------------
Talend | Data Agility for Modern Business