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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
daez
Creator
Creator

Tmap difference on files

Hello guys,

 

I'm trying to compare 2 files (XML) in a tMap and having only the difference between the files as output. (which will be CSV)

 

My job, for now, looks like : 

 

tFileInputXML ---main--->tMap ---> tlogrow

tfileinputXML ---lookup--> (to the same tmap)

 

My tmap is configured as following : Inner join / catch look up inner join reject : true. 

Its working all fine, once a line from lookup is not like my main row, i have it in my tlogrow. What i want to add is :

If my look up file has a line, and my main doesnt have this line anymore, i want the line with 0 as quantity. Any idea?

 

 

An example : on the left the main files, on the right the look up files, as you can see the first <stock> from right disappear (store code 0704 ......)

 0683p000009LxgB.png

 

On my output i want for this case :

<store_code>0704</store_code>

<ean_sku>4067386843085</ean_sku>

<quantity>0</quantity>

<price>32.49</price>

<promo>24.39</price>

 

If anyone can help, would be much appreciate !

Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@daez,take as second file as a primary and first file as a lookup and get the inner join reject  and populate to same way with Hash output and read the same data load connect to tUnite,how i connected.

View solution in original post

8 Replies
manodwhb
Champion II
Champion II

@daez,since you will not get the 0704 ,untill you change the file as a primary in tmap ,which has the 0704 data file .

daez
Creator
Creator
Author

Hi @manodwhb, thanks for the answer. Is there anyway to get my 0704 data while keeping the same main / look up row. If i change this, it wont get the "freshest" info from the first file ... I tried kinda all the jointure possible 

manodwhb
Champion II
Champion II

@daez,since you need to split the flows .for the Reject you need design separte flow .as shown below.0683p000009Lx36.png

daez
Creator
Creator
Author

@manodwhb , thanks for your time and screenshot ! So i cant do it in one time with a tMap if I get it right ?

Any chance i see your tXML map settings & tUnite ? 

 

Kindly

daez
Creator
Creator
Author

@manodwhb, Imagine I have 10 lines in my 2 files. On the most recent one, 3 data changed & one got deleted.

 

I want in my output only the 3 data changed & the line that have been deleted (so i get it from the second files). 

Your idea is to get the 3 data changed with one tMAP then the 1 that got deleted with another tMAP and then join those two new files with a tUnite. This is pretty smart, I didnt see it like that, thanks dude. I success to get the 3 lines, but the " one that got deleted " and need to be get on the second files, how do you do that ? 

How configure the tMap to get the only line that has been deleted in the first file from the second file? ? 

Thanks again

manodwhb
Champion II
Champion II

@daez,take as second file as a primary and first file as a lookup and get the inner join reject  and populate to same way with Hash output and read the same data load connect to tUnite,how i connected.

manodwhb
Champion II
Champion II

@daez,still do you have issue?

manodwhb
Champion II
Champion II

@daez,Please provide Kudos also.