Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nategreen
Contributor III
Contributor III

SnowSQL in Qlik Sense Enterprise

I would like to use SnowSQL to put data in a Snowflake stage using Qlik Sense Execute. I have made a script that works in command line from my server, but when i run it via Execute in a Qlik Sense App's script, the load gets hung. I've come up with a simple example that should be working, but is getting hung. Does anyone have any ideas?

Here is the simple example with and without double quotes that wont work:

Execute cmd c/ snowsql -v > d:/output_file.csv;

Execute cmd c/ "snowsql -v > d:/output_file.csv";

Here is an example of the PUT command that is also not working:

snowsql -c my_connection -q "PUT 'file:////fileshare path/data.csv' @snowflake_DB.SNOWFLAKE.SNOWFLAKE_STAGE OVERWRITE = TRUE"

Please let me know if you've accompished this and have any ideas why its not working.

Labels (1)
2 Replies
marksouzacosta
Partner - Specialist
Partner - Specialist

Hi @nategreen,

Try to move your commands to a batch file and call the batch file from the Execute. That may work.
Be aware that the command is executed with Qlik Sense Service Account credentials. You may be facing some security restriction, like accessing the commands or even writing the output file. Make sure the Qlik Sense Service Account is able to execute your commands.


Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
nategreen
Contributor III
Contributor III
Author

Executing as a batch file does work, but i am working in a multi node enviornment with several schedulers and we have a security policy that prevents executables that are not on the local machine to run. To go the batch route, I need to put the same batch file on each of the nodes' local drives and so its more file management. not ideal, but it does work. I am testing executing the commands as the service account on one of the nodes without issues, which is why this is all so confounding. I wish there was a way to see the logs of qlik sense "executes" because it does feel like i'm flying blind here.