Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
lmit
Creator II
Creator II

matching records in 2 different files

Hi all,

I have a input file(First file) with below data

0695b00000Uy4PtAAJ.png

the second fail has only company name like

0695b00000Uy4R6AAJ.png

the output should be he first row from file 1 as its matching abc from 2nd file

Can you please suggest how to achieve this .

really appreciate

Thanks in advance,

lmit

Labels (2)
8 Replies
Anonymous
Not applicable

Hello lmit,

You can design the job like :

  1. use 2 tFileInputDelimited components to read the 2 files
  2. use tMap to 'Inner Join' the 2 flows by the column 'company name' as the below

0695b00000Uy9uhAAB.png

Anonymous
Not applicable

attach the test job for your reference. thanks

lmit
Creator II
Creator II
Author

Hi @Aiming Chen​ thanks for your response

 

if joins are performed it will be exact match but i want records even if one part of the string matches

like

 

in the 2nd file

I will have only abc

 

but in the first file I will have like

 

abc pvt lim

 

this record should also be considered

 

thanks,

lmit

Anonymous
Not applicable

Hello lmit,

To archive it, you can design the job like:

  1. setup a context variable abc, read the file2 content and setup the context variable 'abc' value by tJavaRow

0695b00000Uy9zDAAR.png 2 use tMap to filter the condition for the flow of file1 like

attach the modified job matchTest_new.zip for your reference.0695b00000Uy9zcAAB.png

PWunsch_1653032151
Contributor
Contributor

I appreciate the information and advice you have shared. I will try to figure it out for more.

9WSYR Weather

lmit
Creator II
Creator II
Author

Thanks @Aiming Chen​ for the reply

the position of "abc" is not fixed .

so i tried without using split function by taking the complete column as context but got zero records

 

Thanks,

lmit

lmit
Creator II
Creator II
Author

Hi ,

any suggestions please

 

thanks in advance,

lmit

lmit
Creator II
Creator II
Author

Hi All,

 

Any suggestions would really appreciate it

 

thanks in advance,

lmit