BookmarkSubscribeRSS Feed
metalray
Calcite | Level 5
Hi Guys,
I have created a view based on some dynamically created view in the WORK library for individual users. It all happens with an STP.

1. proc sql to get user specific data

create view WORK.DIM_SALES_SALESTEAM as select * from connection to olap
(
SELECT NON EMPTY { [MEASURES].[FSUM] } ON COLUMNS,
NON EMPTY { [DIM_SALES].[SALESTAM].AllMembers } ON ROWS
FROM [mycube]
);

2.
/*MAKE VIEWS AVAILABLE FOR PROMPTS (WORK LIBRARY IS NOT A VALID SOURCE) */
create VIEW allshared.WORK_DIM_SALES as select * from WORK.DIM_SALES_SALESTEAM;

This STP also has a prompt that neatly selects from allshared.WORK_DIM_SALES which is now only shows user specific data. The view allshared.WORK_DIM_SALES is also registered in the meta data and its all fine as a source until...

I reach WRS. When I open this WRS I get the
Error: File WORK.MYVIEW.DATA does not exists.

Its seems the STP when executed in WRS does not know anything about the views it just created. Why is that?
If I use CREATE TABLE instead of create view it works fine but that defeats the objects since I dont want a table for each user or those users overwriting each others data.

The error dissapears when I remove the prompt from the STP. Executing a second STP with the prompts but no view creation causes the same error again.

Aim: dynamic cascading prompts that show user specific data retrieved from an OLAP cube member permissions
3 REPLIES 3
metalray
Calcite | Level 5
I just noticed that the STP, executed as STP, does not create the views in the WORK library in the first place. It does, however, do it when I execute the code as a program in EG4.2. I wonder why that is...
In WRS the error reads "unable to find physical table"

A short STP that I and you can use for testing works fine i.e. it shows the output put here as well, the WORK library on the sas application server\libraries is empty. Is there a second work library on somewhere? If so, how do I use it to reference to in sas app server views?

--Executed on the workspace server
--shows html results in EG4.2 albeit error
--ERROR: No logical assign for filename _WEBOUT.
--WARNING: No body file. HTML output will not be created.

%STPBEGIN
*ProcessBody;

proc sql;
create view work.viewthatdoesnotappear as select * from sashelp.class;
quit;

/**/
*ods html file="\myfile.html";
proc print data=WORK.viewthatdoesnotappear;
var Sex;
run;


%STPEND

A view, registered in the metadata that now selects from
work.viewthatdoesnotappear will fail.
metalray
Calcite | Level 5
I included the STP in an Information Map. Defined Information Map specific Prompts
that have the master views as a source and that was a progress.
It seems the work library the STP (Workspace Server) creates the views in and the work library the prompts use are the same now (maybe because they are together wrapped in an Informatio Map)?.
Now, since I have it all in an Information Map the STP needs to get the executors login details to access the OLAP cube. A dynamic user id and a dynamic password.
The Information Map will ultimately be executed in Web Report Studio so which user id and password combination is the right on _Metauser (whatever the password variable will be), &sysuserid (whatever the password variable will be) or some InformationMap user, or even the portal/web report user?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1064 views
  • 0 likes
  • 1 in conversation