Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there ,
I am very new to talend and has very basic question . I am trying to filter rows based on multiple condition . I am not sure how to achieve this ? I see filter expression in tMap but that allowed me to enter only 1 expression and I have multiple condition .
I am trying to put Filter condition based on this . Input data is coming from tMSSQLInput .
1 , MarketingTypeID = row1.TypeItemName.("Marketing") then give me TypeID and put value in the column MarketingTypeID
2 , PrivacyTypeID = row1.TypeItemName.("Privacy") then give me TypeID and put value in the column PrivacyTypeID
I am sure it is very simple question but I am not sure how to solve this Can some one please help .
Hi,
You have not provided your output schema in your query. But I am assuming its two columns in same schema. Based on that assumption, I have created the logic as shown below.
!Relational.ISNULL(row1.TypeItemName)&& row1.TypeItemName.equals("Marketing")?row1.TypeId:null !Relational.ISNULL(row1.TypeItemName)&& row1.TypeItemName.equals("Privacy")?row1.TypeId:null
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 🙂
Hi,
You have not provided your output schema in your query. But I am assuming its two columns in same schema. Based on that assumption, I have created the logic as shown below.
!Relational.ISNULL(row1.TypeItemName)&& row1.TypeItemName.equals("Marketing")?row1.TypeId:null !Relational.ISNULL(row1.TypeItemName)&& row1.TypeItemName.equals("Privacy")?row1.TypeId:null
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 🙂