Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vidya821
Creator
Creator

Data arrangement: multiple rows data in one row

Hi,

 

Here is my requirement

INPUT FILE FORMAT

CONTRACT_NO | NAME | DOB

1 | JOHN | 01/01/2016

1 | SMITH | 05/05/2016

2 | JASON | 06/06/2016

 

OUTPUT FILE FORMAT

CONTRACT_NO | NAME1 | DOB1 | NAME2| DOB2

1 | JOHN | 01/01/2016 | SMITH | 05/05/2016

2 | JASON | 06/06/2016 | |

 

Merge the data with same contract_no into one row

Please let me know which components can be used to achieve the desired output.

Thanks.

 

Labels (1)
  • v6.x

1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Here is what you expect.

0683p000009Lv4i.png

tMap is used to autojoin the entry with itself (here represented by a tFixedFlowInput).

a tUniqRow is used on the main flow to get only the 1st rw for a given contract_no.

Here is the tMap :

0683p000009LvEL.png

On the left side:

- use join model = Left Outer Join in case of only 1 row for a contract_no

- filter on the name to avoid the rows to be join with themself

On the right side:

- in case of null value, replace by an empty string ("")

 

Hope this helps.

View solution in original post

5 Replies
TRF
Champion II
Champion II

Here is what you expect.

0683p000009Lv4i.png

tMap is used to autojoin the entry with itself (here represented by a tFixedFlowInput).

a tUniqRow is used on the main flow to get only the 1st rw for a given contract_no.

Here is the tMap :

0683p000009LvEL.png

On the left side:

- use join model = Left Outer Join in case of only 1 row for a contract_no

- filter on the name to avoid the rows to be join with themself

On the right side:

- in case of null value, replace by an empty string ("")

 

Hope this helps.

vidya821
Creator
Creator
Author

Hi,
Thanks for solution.
I want to link delimited file as input to tUniqRow
but getting a warning on the tInputDelimited as This component shud have input links

 


warning.png
vidya821
Creator
Creator
Author

Sorry i entered wrong component as input component..my mistake
Bluemoon
Creator
Creator

Hi ,

I want to add another approach of getting a solution for this problem 

 

0683p000009LvLa.png0683p000009LuxF.png0683p000009Lufc.png0683p000009LvLp.png

Anonymous
Not applicable

Hello,

Thanks for posting your another approach on forum.

Best regards

Sabrina