[resolved] the AFTER global variable for tMSSQLOutput returning NULL

One Star

[resolved] the AFTER global variable for tMSSQLOutput returning NULL

Hi,
I have a job where I am inserting rows from a csv to a SQL table.
Although rows have been inserted in the table, the NB_LINE_INSERTED is returning NULL.
Am I doing something wrong?


Regards,
Namrata

Accepted Solutions
Community Manager

Re: [resolved] the AFTER global variable for tMSSQLOutput returning NULL

This variable can be only available in the next subjob, for example:
.......main--tMssqlOutput
   |
onsubjobok
   |
tJava
on tJava: 
int inserted_line=((Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED"));
System.out.println(inserted_line);
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] the AFTER global variable for tMSSQLOutput returning NULL

This variable can be only available in the next subjob, for example:
.......main--tMssqlOutput
   |
onsubjobok
   |
tJava
on tJava: 
int inserted_line=((Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED"));
System.out.println(inserted_line);
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Community Manager

Re: [resolved] the AFTER global variable for tMSSQLOutput returning NULL

This variable can be only available in the next subjob, for example:
.......main--tMssqlOutput
   |
onsubjobok
   |
tJava
on tJava: 
int inserted_line=((Integer)globalMap.get("tMSSqlOutput_1_NB_LINE_INSERTED"));
System.out.println(inserted_line);
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] the AFTER global variable for tMSSQLOutput returning NULL

Works like a charm!!
I can be certain I had tried it before and hadn't worked though Smiley Happy
Thanks!!

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download