Update DB value based on success or failure at end of job

Six Stars

Update DB value based on success or failure at end of job

Hi,

 

I have a global variable "passOrFail" set in globalMap. At the end of all the operations in a job, I need to check or "passOrFail" variable, if it is set to 1, I need to update a status value in DB as 1 else I need to update status value to 0. Can anyone please let me know how I can achieve the same ?

 

Thanks. 

Seven Stars

Re: Update DB value based on success or failure at end of job

before your outputDB component check for global variable  "passOrFail" value in java and set status value to 1/0 as per condition matched and let all other columns be as it is

 

 

 

 

Regards 

Chandra Kant

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 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog