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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression Builder Syntax MisMatch in tMap

Guys, I will be working on creating logic using Inner Join in tMap component. 

Request: Two inputs with the same fields(columns), I trying to find matched and unmatched records from both inputs.

Fields: Email, FirstName, LastName & City

Criteria: Check each and every fields in both inputs using join, If all the field in the row matches it goes to Matched output else Error path. Example: If a File A holds ABC as FirstName and FileB holds different value or blank it will be rejected and Staus should be updated as "Not Matched".

Components: tFileInput Delimited (2)-->tMap -->Output - Matched & Output - Rejected

I tried the below syntax and it fails to provide the status as "Not Found" as this is used for 'Email' field check.

 

((!row5.Customer_Email_Address.equals(row6.Customer_Email_Address)) ? "Not Found" :
(!row5.MMTFirstName.equals(row6.MMTFirstName) ? "Not Matched" : "Error")

 

Can you please help to provide the workaround. Screenshot attached for reference.

Labels (2)
7 Replies
manodwhb
Champion II
Champion II

@y2k_karthi ,use the below one and let me know and fields data types should be string.

 

(!row5.Customer_Email_Address.equals(row6.Customer_Email_Address)) ? "Not Found" :
(!row5.MMTFirstName.equals(row6.MMTFirstName) ? "Not Matched" : "Error")

Anonymous
Not applicable
Author

Hi @manodwhb, Thanks for your response. 

 

This is still not working, it throws the same status "Not Found" (1st case expression) for both the cases. Can you help me to get rid of this? Attached the ss for reference. 

 

Thanks in Advance!!


tMapExpression.jpg
manodwhb
Champion II
Champion II

@y2k_karthi , can you give sample input for those two columns and required output ,so that I will test from my end. you need to break it down to see where the problem is

Anonymous
Not applicable
Author

@manodwhb - I have attached data file(Input_1 & Input_2), One sheet holds four and another with three records.
I'm looking to get the rejected data with "Not Found" status for missing one and "FirstName Not Matched" for values mismatched column FN.


Also, added a sheet to show how I need the rejected O/P.

 

Thanks,
Karthi


Data.xlsx
manodwhb
Champion II
Champion II

@y2k_karthi , your job design should be like below to get the required output. and sheet 1 is Main and sheet 2 should be lookup.

 

0683p000009MZk6.pngJob0683p000009MZjY.pngoutput0683p000009MZcr.pngtMap settings

Anonymous
Not applicable
Author

@manodwhb - I agree with your point. This will work by checking one field(First Name), Whats the possible way to accomplish to check multiple fields(Last Name, Country, State, Zip Code, etc.,?

And, Whether it work only by using tHashOutput & Input? My idea to capture the O/P after tMap.

manodwhb
Champion II
Champion II

@y2k_karthi , you need to check manually if you want to check for each and every field the same way.

 

you cannot connect o/p from the same origin that you need to combine two outputs into  singe right.