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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantk19
Creator
Creator

Error strategy in Talend job

Hi,

 

I have a requierment to check if the value in a particular field is NULL after my target table is loaded. whats the best and easiest way to add this error strategy to my existing job? can i add something at the end of the job to check this? i am new to talend so looking for suggestions. if it finds a NULL value in column, then it should throw an error e.g "This is an error record"

Labels (2)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@sushantk19 , if that is the case after loading data into that target table you need to read that table and check for if the column values is null then you need write expression error column in tmap and connect to tfileoutputdelimited.

 

intmap expression should be like below

 

row1.col1==null?"col1is having null values"Smiley Sadrow1.col2==null?"col2 is having null values:"")

View solution in original post

4 Replies
manodwhb
Champion II
Champion II

@sushantk19 , if the field is null then you do not want to load into the target or you want to flag that record as error record in field.

sushantk19
Creator
Creator
Author

Hi,

 

I want to flag the records as error records along with error text message in flat file for further Analysis. This needs to be done after my data gets loaded in my target table. what is best way to go about this?

manodwhb
Champion II
Champion II

@sushantk19 , if that is the case after loading data into that target table you need to read that table and check for if the column values is null then you need write expression error column in tmap and connect to tfileoutputdelimited.

 

intmap expression should be like below

 

row1.col1==null?"col1is having null values"Smiley Sadrow1.col2==null?"col2 is having null values:"")

sushantk19
Creator
Creator
Author

ok thanks! that works!