tOracleRow_1_NB_LINE_DELETED does not yield correct results

Highlighted
Six Stars

tOracleRow_1_NB_LINE_DELETED does not yield correct results

Hello / Hi

 

I had a requirement to get the number of rows deleted from a table after i execute the query using toraclerow. I used the option NB_LINE to get the value of number of lines deleted during the operation .

 

I used a tjava with System.out.println(((Integer)globalMap.get("tOracleRow_1_NB_LINE_DELETED"))); to get the info, but this always returns null. Not sure if i am going wrong somewhere. I am planning to go for a workaround with toracleinput and toracleoutput.

 

could anyone advice if its really the solution to go with the workaround or am i making some mistake with the toraclerow..

 

Thanks


Accepted Solutions
Highlighted
Sixteen Stars
Sixteen Stars

Re: tOracleRow_1_NB_LINE_DELETED does not yield correct results

Hi,
Based on the documentation, tJava is executed first, but only once in the subjob. Normally, tJava has no input or output data flow and is used as a separate subjob.
So, depending on where is placed the component it may be normal to get null value.
Share your job design if necessary.

TRF

View solution in original post


All Replies
Highlighted
Sixteen Stars
Sixteen Stars

Re: tOracleRow_1_NB_LINE_DELETED does not yield correct results

Hi,
Based on the documentation, tJava is executed first, but only once in the subjob. Normally, tJava has no input or output data flow and is used as a separate subjob.
So, depending on where is placed the component it may be normal to get null value.
Share your job design if necessary.

TRF

View solution in original post

Highlighted
Moderator

Re: tOracleRow_1_NB_LINE_DELETED does not yield correct results

Hello,

Please have a look at this article about:What-is-the-difference-between-tJava-tJavaRow-and-tJavaFlex.

Hope it will help.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Six Stars

Re: tOracleRow_1_NB_LINE_DELETED does not yield correct results

On executing the tjava as "when subjob ok", it works fine. Thanks..

 

One another question "Can we access these globalmap variables from tmap component ? "

 

Regards

Highlighted
Moderator

Re: tOracleRow_1_NB_LINE_DELETED does not yield correct results

Hello,


@sensiva wrote:

On executing the tjava as "when subjob ok", it works fine. Thanks..

 

One another question "Can we access these globalmap variables from tmap component ? "

 

Regards


What's your further processing? Could you please give us more information about your requirement?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

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