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

Microsoft SQL connections

Hi Team ,
Thanks in advance. I have developed a simple job for reading a txt file and load the data into db using tmssqloutput component . After establishing the connections with a particular db, talend would prepare insert scripts to load data into db . Is it possible to retrieve those elements in talend . I'm aware of getting this information using sql server profiler . But can we get this done using talend ?
Thanks,
Karthik
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Karthik,

 

Yes, you can do this by ticking "Enable debug mode" in the Advanced Settings of your tMSSqlOutput component, then sending the Main output to a tFlowToIterate, at which point you'll have access to the query executed in a global variable named similar to "tMSSqlOuput_1_QUERY".

 

Here's an example which logs the query to the console in a tJava component:

 

0683p000009LrWl.png

 

The code in tJava_1 is just:

 

System.out.println(((String)globalMap.get("tMSSqlOutput_1_QUERY")));

 

Regards,

 

 

Chris

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi Karthik,

 

Yes, you can do this by ticking "Enable debug mode" in the Advanced Settings of your tMSSqlOutput component, then sending the Main output to a tFlowToIterate, at which point you'll have access to the query executed in a global variable named similar to "tMSSqlOuput_1_QUERY".

 

Here's an example which logs the query to the console in a tJava component:

 

0683p000009LrWl.png

 

The code in tJava_1 is just:

 

System.out.println(((String)globalMap.get("tMSSqlOutput_1_QUERY")));

 

Regards,

 

 

Chris