How to capture error after running tDQReportRun in a job

Highlighted
One Star

How to capture error after running tDQReportRun in a job

When a report analysis fails to run in tDQReportRun, the EXE_STATUS column returns a result of "false", but the job returns as successful [exit code=0]. We need the job to return exit code > 0, so when we automate it, we know to troubleshoot the failure. Is there a workaround?
Community Manager

Re: How to capture error after running tDQReportRun in a job

Hi
I tested and found that the job always think the tDQReportRun component works fine even though the report file is not found or the db connection failure, the job do not throw out the exception, so now we can not capture directly the error with tLogCather, for me, the 'die on error' feature is needed on this component.

A workaround is to parse the value of EXE_STATUS column, if it equals to false, meaning the report runs failure, it will fires a tWarn component execution, on tWarn, you can define the error message with the value of INFO_FAILURE column, define the return code, and use tLogCatcher to catch the tWarn message. For more details, please see my screenshots.

code on tJavaRow:
if(input_row.EXE_STATUS==false){
globalMap.put("isFalse",true);
context.message=input_row.INFO_FAILURE;
}else{
globalMap.put("isFalse",false);
}

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to capture error after running tDQReportRun in a job

This workaround is exactly what I'm looking for. I will test this solution soon.

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

Enabling Data Governance

Learn how to enable Data Governance

Watch Now

The Definitive Guide to Government Data Quality

Take a peek at the definitive guide to Government Data Quality

Read