BookmarkSubscribeRSS Feed
raulet69
Calcite | Level 5

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.

1 REPLY 1
I_Kong_SAS
SAS Employee
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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1376 views
  • 0 likes
  • 2 in conversation