Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Executing a SQL query from the Data Preparation in SAS Visual Analytics

Reply
Regular Learner
Posts: 1

Executing a SQL query from the Data Preparation in SAS Visual Analytics

Hello chaps,

 

Question for you: is it possible to upload to memory a table when all you have is a SQL query, not an actual table?

 

In other words, I am suposed to do a dashboard on a set of data for a client, but what the client has given me is not a table name bot a sql query. I was under the impression that it would not matter but I am finding otherwise.

 

So when I open the Data Preparation module the options I have is to add a table to the query, 

 

I have fiddle a bit with the code in the CODE tab and I have managed to come up with a set of code that runs successfully and, in theory, creates a view off the sql query I have.

 

LIBNAME vertica VERTICA PRESERVE_COL_NAMES=YES PRESERVE_TAB_NAMES=YES  SERVER="servername" DATABASE="dbanme" PORT=5433 USER=user PASSWORD=pwd;
 
proc sql;
  create view TEMP_LASR_VIEW_0 as
   select * from vertica.SOME_TABLEs AND SOME_JOINS;
proc printto; run;

 

 

So this runs successfully. But I cannot find the TEMP_LASR_VIEW_0 in the Administration part of VA. Where is that TEMP_LASR_VIEW_0 view created??

 

Unfortunately I don't have access to E.Guide, SAS Studio or anuthing like that, only to SAS VA.

 

Thanks for your help.

SAS Employee
Posts: 23

Re: Executing a SQL query from the Data Preparation in SAS Visual Analytics

Hi raulet69, if I followed your question correctly, if you start with the UI and then unlock the generated code to enter your code: in the UI you should see a Properties panel where you can set the view option. In the Output panel you set a name for this view. At the bottom of the generated code, this name is then used in a data step with a set statement. Give that a try. Hope that helps.
Ask a Question
Discussion stats
  • 1 reply
  • 220 views
  • 0 likes
  • 2 in conversation