How to check in tmap NULL and NOTNULL value in IF Conditional.

One Star

How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi
I have been reading through some posts, but not sure I am understanding.
I have an input tables with values. I need to do the following Conditional in tmap.
All the columns are string value.
IF ISNULL(ROW1.JURISDICTION1) THEN
INPUT.XMLTAG1
ELSEIF ISNOTNULL(ROW1.JURISDICTION1) and ISNULL(ROW2.JURISDICTION2) THEN
INPUT.XMLTAG2
ELSEIF ISNOTNULL(ROW1.JURISDICTION1) and ISNOTNULL(ROW2.JURISDICTION2) THEN
INPUT.XMLTAG3
END IF;
Could you please help me this..
Thanks
Rajesh G
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi Rajesh
Try this.
ROW1.JURISDICTION1==null? INPUT.XMLTAG1Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2==null)?INPUT.XMLTAG2Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2!=null)?INPUT.XMLTAG3:""))
Regards,
Pedro
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi,
This solution works??
Thanks!
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Hi,
This solution works?
I have the same problem.... but this not resolve....
Thanks,
Cláudia
Hi Rajesh
Try this.
ROW1.JURISDICTION1==null? INPUT.XMLTAG1Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2==null)?INPUT.XMLTAG2Smiley Sad(ROW1.JURISDICTION1!=null)&&(ROW2.JURISDICTION2!=null)?INPUT.XMLTAG3:""))
Regards,
Pedro
One Star

Re: How to check in tmap NULL and NOTNULL value in IF Conditional.

Use Talend relational functions

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download