Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
nordestinformatica
Partner - Contributor II
Partner - Contributor II

Qlik Sense: Execution script stored in SQL Server

Hello,

I created a stored procedure in SQL Server that returns a script that needs to be executed in Qlik Sense.

Using the following script in Qlik Sense i can extract Data.

Script:
sql exec dbo.testraf ; //this command returns a table with the field pipposcript populated with the following string "TEST: load *; Sql Select * from parametridoc;"

let v_test=peek('pipposcript',0,'script');
drop table Script;
$(v_test);

My goal would be to execute the script returned by the stored procedure without passing through a variable.

Any suggestions please?

Thank you! 

Raffaele

Labels (1)
1 Solution

Accepted Solutions
marksouzacosta
Partner - Specialist
Partner - Specialist

I don't think that will be possible because if the user is curious enough, he can access your code through the Log files. What if you run your code in another Qlik Sense Application, that on in a secured Space, and you do a Binary Load in your Dashboard App? That way the Load Script will be completely invisible to the end users.

Are we all from Brazil here?

Read more at Data Voyagers - datavoyagers.net

View solution in original post

7 Replies
Gui_Approbato
Creator III
Creator III

Hi Raffaele,
After your Let, create another variable with SET.

The code below for example works:

 

Set vScript = 'Load rowno() as Row Autogenerate(10);';

$(vScript)

marksouzacosta
Partner - Specialist
Partner - Specialist

Not sure if you can do that.
Anyway, I'm curious why you need to do such thing. Can you please share your requirements? Why don't your Stored Procedure just return the records you need?

Read more at Data Voyagers - datavoyagers.net
nordestinformatica
Partner - Contributor II
Partner - Contributor II
Author

Hello Marksouzacosta,

i need to hide QlikSense script. I have created a stored procedure that only if a predefined condition is satisfied will return the code to execute.

I don't want that users can access to this script.

Thanks

nordestinformatica
Partner - Contributor II
Partner - Contributor II
Author

Hello Gui_approbato

I would like to eliminate my LET statement because I don't want to pass through a variable
marksouzacosta
Partner - Specialist
Partner - Specialist

I don't think that will be possible because if the user is curious enough, he can access your code through the Log files. What if you run your code in another Qlik Sense Application, that on in a secured Space, and you do a Binary Load in your Dashboard App? That way the Load Script will be completely invisible to the end users.

Are we all from Brazil here?

Read more at Data Voyagers - datavoyagers.net
Gui_Approbato
Creator III
Creator III

Good approach Mark