BookmarkSubscribeRSS Feed
metalray
Calcite | Level 5
Hello,
I have created a view and can select from it as well but somehow it does not show up as an object when I use EG4.2 or the Management Console.

create view Test_BASE.WORK_myway as select * from WORK.myway;

select * from Test_BASE.WORK_myway;

--result is displayed
3 REPLIES 3
twocanbazza
Quartz | Level 8
Have you defined it in the Metadata?
metalray
Calcite | Level 5
Hello twocanbazza,
A good question and that was/is indeed the problem. I am unable to register a VIEW based on a WORK table in the metadata.
1. If I use EG 4.2 via Tools -> Update Library Metadata I get the error
"No metadata objects found matching the specified URI".
Odly, one of the three Views is registered and ready to use. (strange)

2. If I use SAS OLAP Cube Studio -> Register tables and select the tables
that are part of the library, I get the error "WORK.MygreatView.DATA does not exists."
The table is then registered without any variables or data.

Note, this all works fine if I register VIEWS that do --not-- select from the WORK library but as soon as the view select from the WORK library the whole thing causes problems.

Why I use the WORK library? - I want to create prompt source tables that are filled depending on the user login (dynamic PROC SQL - identity driver properties) by a STP that executes as soon as the web report opens.
metalray
Calcite | Level 5
I managed to register the tables in metadata with the following code:

proc metalib;
omr (library="Amylib");
select(View1);
report;
run;

(the code generated by EG 4.2 is missing the SELECT line).

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
  • 1086 views
  • 0 likes
  • 2 in conversation