One Star BN
One Star

What components can I use to Select records from database, update the same set of records and then send those same set f records for a API call (Sequence of call as mentioned).

 
4 REPLIES
Twelve Stars TRF
Twelve Stars

Re: What components can I use to Select records from database, update the same set of records and then send those same set f records for a API call (Sequence of call as mentioned).

Hi,

- t<database>Input (replace <database> by the appropriate one)

- t<database>Output

- tREST, tRESTClient, tSOAP (depending on the API you have to call)


TRF
Five Stars SD
Five Stars

Re: What components can I use to Select records from database, update the same set of records and then send those same set f records for a API call (Sequence of call as mentioned).

I have same columns in tRedshiftInput and RedshiftOutput schema, except that I have an extra col RedshiftOutput that I want to Update with "Y". I am getting the following error while updating. Since I can't see the sql getting generated, I don't understand what the issue is. I have tried many options:

[FATAL]: redshift_dev.load_leads_rs_to_restapi_jsoncall_good_batching_0_1.Load_Leads_RS_to_RESTAPI_JSONCall_GOOD_Batching - tRedshiftOutput_1 [Amazon](500310) Invalid operation: zero-length delimited identifier at or near """";
Exception in component tRedshiftOutput_1
java.sql.SQLException: [Amazon](500310) Invalid operation: zero-length delimited identifier at or near """";
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830)

Error_sc1.png

 

 

 

Five Stars SD
Five Stars

Re: What components can I use to Select records from database, update the same set of records and then send those same set f records for a API call (Sequence of call as mentioned).

Hi:

 I was able to get rid of that error (that was due to a Non-DB field being in the schema). However, the Update component is not updating a DB field. I want to update a particular DB field to a value of "Y" for all the records that is coming from the Input component . I have set the field's  default to "Y" in the Input and Output schema and that is not updated in the database. Am I missing something?

Thanks,

 

Five Stars SD
Five Stars

Re: What components can I use to Select records from database, update the same set of records and then send those same set f records for a API call (Sequence of call as mentioned).

I am able to update the records now.I needed a tMap before tReshiftUpdate, to get the value for the column to be updated.

Thanks.