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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How do i combine rows from same data source after they are splitup?

0683p000009LuOE.png

 

I want to combine output of tMap2,tMap4,tMap5 , so that I can write the final output in 1 file. Each of tMap components has comumns A,B,C. I want to combine them by tMap2.A=tMap4.A=tMap5.A && tMap2.B=tMap4.B=tMap5.B and want to keep C of each of the three tMap components.

Any help on how to do this , much appreciated..!

Labels (1)
  • v6.x

1 Solution

Accepted Solutions
vapukov
Master II
Master II

direct - it is not allowed, but You can store result of each tMap into memory, than join all 3

 

You can use for this tHashInput / tHashOutput component

in default palette both not present, You need open menu File -> Project Settings -> Designer -> Palette settings and enable them for Your project.

 

0683p000009LuOJ.png

View solution in original post

7 Replies
vapukov
Master II
Master II

direct - it is not allowed, but You can store result of each tMap into memory, than join all 3

 

You can use for this tHashInput / tHashOutput component

in default palette both not present, You need open menu File -> Project Settings -> Designer -> Palette settings and enable them for Your project.

 

0683p000009LuOJ.png

Anonymous
Not applicable
Author

well in Op's case  it is possible to simply add the data in the same file in separate flow while keeping the file in append mode and disabling the headers

cterenzi
Specialist
Specialist

It sounds like the OP wants output along the lines of A, B, C1, C2, C3 rather than just writing all output to one place.  In that case, Vapukov's solution would be appropriate.  Really any intermediate data store will work-- temp files or database tables being other alternatives.  HashMaps are the simplest and fastest option, I think.

Anonymous
Not applicable
Author

ok, I have removed TFiledelimetdout and tried above mentioned solutions. Could anyone tell me how the data is flowing through this workflow. Like I have used 3 tHashOutut -> 1 tHashInput and wrote result in delimeted File. Bu the final result has duplicates. A record that is filtered through the First line of Job design, goes is repeated 7 times.
So, I wonder how exactly data is lowing across this?

Besides, what I really need is join condition but the above mentioned solution is working on Append strategy

vapukov
Master II
Master II

can't understand without picture, but look different with Your original idea

 

look for the Hashoutput same as for tLogRow or tFileOutpitDelimited

 

You can do JOIN and etc - this changes not add duplicates by it self if not present in logic

Anonymous
Not applicable
Author

This is what I am doing: But this strategy is appending the data of tHashInput1 and tHashInput2. What I actually need is to Join the data on 1 of the 5 coloumns of data sets stored in tHashInput1, tHashInput2.?

 

0683p000009LtrA.png

vapukov
Master II
Master II

the proper answer always depends from - what You do and try to achieve, what data, what in Your filters, what in tMaps, what JOIN conditions?

duplicates not come from nowhere if You do not have them original or not create them by Your self on previous steps

 

if we return to original question - You save information in 3 separate and ask - how to JOIN all 3 on same Job

 

tHashOutput1/2/3 -> tHashInput1/2/3 is answer for this question, same for 300% as You do with csv files and tLogRow

is it have duplicates? - I do not know, it depend from whole Job logic