StoreSQLQuery is a variable that can be used to debug a tDBInput scenario which does not operate correctly. It allows you to dynamically feed the SQL query set in your tDBInput component.
Use the same scenario as scenario 1 above and add a third component, tJava.
Connect tDBInput to tJava using a trigger connection of the OnComponentOk type. In this case, we want the tDBInput to run before the tJava component.
Set both tDBInput and tLogRow component as in tDBInput scenario 1.
Click anywhere on the design workspace to display the Contexts property panel.
Create a new parameter called explicitly StoreSQLQuery. Enter a default value of 1. This value of 1 means the StoreSQLQuery is "true" for a use in the QUERY global variable.
Click on the tJava component to display the Component view. Enter the
System.Out.println("")command to display the query content, press Ctrl+Space bar to access the variable list and select the global variable QUERY.
Go to your Run tab and execute the Job.
The query entered in the tDBInput component shows at the end of the job results, on the log: