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
1 ACCEPTED SOLUTION

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
3 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!!