Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bramvdpoel
Contributor III
Contributor III

Unwanted multiple rows

Hello,

I'm load from multiple .txt tables.

Table A :

  • [Deltakey]
  • [Article]
  • [Descr]

Table B :

  • [Deltakey]
  • [TBSNr]

Table C:

  • [TBSNr]
  • [ArtInfo]
  • [RowNr]

Made the expression for Table C:

IF([RowNr=001, [ArtInfo]) as [Artinfo1]

IF(RowNr=002, [ArtInfo]) as [ Artinfo2]

Table gets loaded:

Row1:    [Deltakey][Article][Artinfo1][Blank]

Row2:    [Deltakey][Article][Blank][Artinfo2]

 

How do i get artinfo1 & artinfo2 in the same row?

1 Solution

Accepted Solutions
rubenmarin

Hi, each TBSNr has 2 rows?
You can start loading Table C to do the mappings:
mapArtinfo1:
Mapping LOAD TBSNr, ArtInfo From ... Where RowNr=1;

mapArtinfo2:
Mapping LOAD TBSNr, ArtInfo From ... Where RowNr=2;

And load Table B as:
LOAD DeltaKey, TBSNr,
ApplyMap('mapArtinfo1', TBSNr, Null()) as Artinfo1,
ApplyMap('mapArtinfo2', TBSNr, Null()) as Artinfo2,
From ...

View solution in original post

2 Replies
rubenmarin

Hi, each TBSNr has 2 rows?
You can start loading Table C to do the mappings:
mapArtinfo1:
Mapping LOAD TBSNr, ArtInfo From ... Where RowNr=1;

mapArtinfo2:
Mapping LOAD TBSNr, ArtInfo From ... Where RowNr=2;

And load Table B as:
LOAD DeltaKey, TBSNr,
ApplyMap('mapArtinfo1', TBSNr, Null()) as Artinfo1,
ApplyMap('mapArtinfo2', TBSNr, Null()) as Artinfo2,
From ...

bramvdpoel
Contributor III
Contributor III
Author

Worked perfectly! Thx