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

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

Multiple lookups

Hello Guys,

 

i need to check multiple conditions before doing the data mapping 

my scenario i have a exce file as given below

0683p000009M4dl.png

 

this is how my input file looks like i need to convert this excel file as csv .through dataMapping.

First lookup:In my input file Reason_1 column i need to check where ever Reactive Maintenance,Vandalism/ Graffiti,Accident,Driver abuse is coming while mapping i need to change that as ACR in my output file.

 

second lookup: need to check two columns Reason_1 should be Scheduled Maintenance and  Componentry Type should be Maintenance then output folder my Reason_1 should be MMR like this how can i achieve it 

 

0683p000009M4Y6.png

 

my output file should be like 

 

0683p000009M4lS.png

 

 

kinldy help me to sort this.

 

 

Regards,

Abisha

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

    Please try below code snippet.

 

 !Relational.ISNULL(row1.componenttype) && row1.componenttype.equalsIgnoreCase("Maintenance")?row2.lookup :"ACR"

where the tMap join is as shown below.

0683p000009M4lw.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Hi Abisha,

 

    The most easy to do it is by tMap. For getting the code value, use a Left Outer join lookup and it will give the data.

 

    For converting the value based on condition of both columns, you can send both input values to the target output column and use condition check for converting them to target column.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

Anonymous
Not applicable
Author

hi if possible can you send some screenshot and help me,

since I am unable to pick up what are you telling it wil be helful

Anonymous
Not applicable
Author

0683p000009M4lc.png

 

 

this is my Tmap what changes I should do ?

Anonymous
Not applicable
Author

Hi,

 

   Since you are having only one entry for Scheduled Maintenance, it should automatically get the correct value.

 

   What is the output you are currently getting?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

Anonymous
Not applicable
Author

Hi ,

 

I just sent you sample there  will be many rows like this and I am getting the following output

 

 

0683p000009M4lr.png

 

 

if my componentry_type is maintenance and Reason_1 is Scheduled Maintenance then I should get MMR

but in this case whatever is there in Componentry_type its considering only scheduled maintenance.

the above mapping which I have shared is giving me this output.

 

 

Anonymous
Not applicable
Author

Hi,

 

    Please try below code snippet.

 

 !Relational.ISNULL(row1.componenttype) && row1.componenttype.equalsIgnoreCase("Maintenance")?row2.lookup :"ACR"

where the tMap join is as shown below.

0683p000009M4lw.png

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

hey wow its working yar..much appreciated