tRESTResponse - multiple response based on different conditions

Five Stars

tRESTResponse - multiple response based on different conditions

How to make custom return status code and return different responses based on different conditions.

 

I have a POST request and based on the insert in database or not I want to return success or error in tRESTResponse, how do I do that? Can someone please guide ???

(eg - error can be due to datatype mismatch in input and database field) checking and returning error accordingly in tRESTResponse

Tags (1)
Sixteen Stars TRF
Sixteen Stars

Re: tRESTResponse - multiple response based on different conditions

Store return code in a global variable to be reused in tRESTResponse.

Here is an example:

tRestResponse.png


TRF
Five Stars

Re: tRESTResponse - multiple response based on different conditions

I am a beginner in Talend. I have a tDBOutput component and want to capture the error like violation of unique constraint or input that exceeds field size.

ORA-12899: value too large for column Unit or ORA-00001: unique constraint (UNKNOWN.obj#=265738) violated. How to I get the error code and return response accordingly based on success of failure ?

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

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read