KSQuery SQL command with String Variable in KnowledgeStudio
Dear Sir,
I am looking for some automation scripts execution in KnowledgeStudio. The way I do in the first stage is to open KSQuery log view and run model(Ex: DeepLearning Model). The log has be captured successfully in KSQuery log view. The next step I want to do is to change some model parameters, such as hidden layer no and node in each layer in the log scripts I recorded. The original hidden layer parameters is '40/40/40'. I try to declare SQL variable and set this variable like below codes
DECLARE @HiddenVar AS VARCHAR(10)
SET @HiddenVar='40/40/40'
however, when I run these two line by using KSQuery.exe in command line. I always bring me error. can't parse the DECLARE...
If I want to replace '40/40/40' in the KSQuery script by variable, Ex: HiddenVar, what should I do?
Answers
-
Hi John,
Go back to the DeepLearning Model node in your Knowledge Studio workflow. Modify the input parameters az you wish, and then retrain (rerun) the model. Then you have an updated KSquery log.
0 -
Mahshid said:
Hi John,
Go back to the DeepLearning Model node in your Knowledge Studio workflow. Modify the input parameters az you wish, and then retrain (rerun) the model. Then you have an updated KSquery log.
Hi Mahshid,
Thanks for your comment. I know the way you suggest becuase I did this before. I know I can directly change the parameter value in the recorded script by string compared and replaced. But, that is not I want and that is time-consuming for full context search and replace.
What I want to is find a way to replace the parameters value by variables defined external without open KS GUI. Then, I just need to change the variable value and rerun the script again. I don't know if this way is possible because I don't know what script language is adopted in KSQuery. When I look the recorded script, I think that looks like SQL and guess maybe support the string variable declaration and assignment. If that is not possible, I will go back to search and replace way to implement.
0 -
Hi John,
The language used by the Knowledge Studio engine is SQL DMX (SQL with Data Mining eXtensions). I asked Knowledge Studio developers how the use of variables is supported, and what's the right syntax for that. Will get back to you hopefully by the end of this week.
Regards,
Dmitri
0