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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to log executed query to console? (tOracleRow)

Need to log the executed query used within the tOracleRow component to the console window in order to have a complete Job execution protocol. Any idea how to log the query?
Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi,
Here is a global variable  ((String)globalMap.get("tOracleRow_1_QUERY")) from tOracleRow which is the SQL query statement being processed.
Best regards
Sabrina
Lorenzo5
Creator
Creator

Hi,
Here is a global variable  ((String)globalMap.get("tOracleRow_1_QUERY")) from tOracleRow which is the SQL query statement being processed.
Best regards
Sabrina

Hi Sabrina,
is there any way to be able to enable/disable query logging for most/all DB components in a job, for debugging purpose?
I could use one/many tJava component(s) (one it'd be better), and 'println' any query I need to log, but sometime it is not so easy to find out where to link the tJava component for a good flow design and optimization.
Any suggestion?
Thank you,
Lorenzo
vapukov
Master II
Master II

generally query - most easiest part for debug
You always can catch them from database side 
Lorenzo5
Creator
Creator

generally query - most easiest part for debug
You always can catch them from database side 

Sometime jobs are a better common point where to implement different monitoring/debug policies, to decide which queries to log, for example when you interact with different databases and/or a lot of clients and jobs are querying at the same time.
vapukov
Master II
Master II

Sometime jobs are a better common point where to implement different monitoring/debug policies, to decide which queries to log, for example when you interact with different databases and/or a lot of clients and jobs are querying at the same time.

I have DBA background, so I just not meet no one case when I will need log queries in Talend, when need - I debug all direct on database
From my point of view - all problems could be only from variable parameters, so I will debug variables, but not a query
but as Sabrina explain above for the ROW component You can use - ((String)globalMap.get("tOracleRow_1_QUERY"))
vapukov
Master II
Master II

in additional, I never look for this information, but at least in TAC (subscription) - all database queries write to the log
0683p000009MAk2.png
in Studio (not Open) You can select Log4JLevel - Debug (same if You Build Job), and You will also have all queries on console:
0683p000009MAzg.png  0683p000009MBEG.png
will need to check - component from Exchange for Log4Jhow it work
vapukov
Master II
Master II

not so easy as on subscription, but still possible  
0683p000009MB6c.png   0683p000009MAxu.png   0683p000009MApH.png