Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Find number of rows returned from tMySQLRow

Hello,
I've noticed many variables produced from other components by way of getGlobal().
I'm wondering if it's possible to find the number of rows returned by a tMySQLRow or tMySQLInput?
Thank you
-Joe
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi,
Talend has default global variables of processed row number for component(see my pic), the number of row is produced when the job are running, so you cannot set one by getGlobal() tSetGlobalVar.
Best regards
Sabrina
0683p000009MEhG.png
Anonymous
Not applicable
Author

This doesn't seem to be the case when I run my job. I am able to get QUERY, however I am not able to get NB_LINE. See attached image.
my code from tFixedFlowInput:
context.iNextID
((Integer)globalMap.get("tMSsqlInput_1_NB_LINE"))
((String)globalMap.get("tMSSqlInput_1_QUERY"))
Anonymous
Not applicable
Author

Looks like a typo, ((Integer)globalMap.get("tMSsqlInput_1_NB_LINE"))
^Capitalize Me
0683p000009MACn.png
Anonymous
Not applicable
Author

Genius!
Much appreciated jholman! Indeed that was the problem.
0683p000009MA5A.png
Anonymous
Not applicable
Author

Hi jpetsche,
You can use an existing global variable or context variable in any component properties field. Press Ctrl+Space bar to display the full list of global and context variables used in various predefined Java functions. That way will avoid typo issue.
In addition, could you please mark this topic as"resolved"?
Best regards
Sabrina