cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

In CIDS how does one merge data from 2 tables but have the same output format?

micbur250
Discoverer
0 Likes
617

I have tried multiple joins to no success. In the normal Data Service there is a MERGE transform but in CIDS this is not the case. I have 2 files with 3 columns. I want to merge the data in both into 1 file. There is no key as data could be on both, or data could just be on one or the other. If file 1 has 100 records and file 2 has 50...the merged file should have 150.

Accepted Solutions (0)

Answers (1)

Answers (1)

jez_lawson
Participant
0 Likes

Hi Micbur,

I am really late to the party here, but I searched looking for help (and there isn't much out there).  I have subsequently managed to get this working.

Add a Row Generator with a count of 2.

In table 1 add a field TheKey with a value of 1

In table 2 add a field TheKey with a value of 2

Join the 3 tables (Row generator and the 2 tables to merge).  Set two left outer joins with the row generator on the left the two tables to merge on the right and linking to the two TheKey fields to the generated number.

You can use IFTHENELSE to select the value from the correct table.

This works really nicely - it would be great if we had a Union command.

Regards,

Jez