Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.