BookmarkSubscribeRSS Feed
Abhijit
Calcite | Level 5

Hi All

 

I have a library defined in SAS SMC called DDMD. Every week, I need to register new tables.I want to update Metadata thru a SAS Batch job.

 

For Example - Last week, I registered tables A, B & C. This week I need to register C, D & E. For the E-Guide user, the next day it should be only 3 tables visible in DDMD library, i.e C, D & E. I recieve theTableNames in a control file. It is possible that physically tables A & B still exists.

 

I am using the below code, the downside of this code is  ... if physically any of the old tables still exists then it will not be deleted. The users will be able to see it.

 

libname AAA meta library="DDMD" metaout=datareg;
proc sql noprint;
   select quote(trim(memname)) into :list separated by " "
   from dictionary.tables
   where libname="AAA"
    ;
quit;
%put Value of list: &list.;

 

proc metalib;
   omr (library="DDMD");
   update_rule(delete);
   select (&list.);
   report (type=detail);
run;

2 REPLIES 2
error_prone
Barite | Level 11

The function metadata_delobj can be used to remove the registered table from metadata, no sure that all associated objects are deleted also. New in 9.4m1 is a tool called "sas-delete-object", described in http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p0zqp8fmgs4o0kn1tt7j....

SASKiwi
PROC Star

If you change your SMC DDMD library definition as shown in the screenshot then you don't have to register metadata at all and all tables will show in EG / SAS Studio etc.

 

screenshot13.jpg 

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
  • 2 replies
  • 765 views
  • 0 likes
  • 3 in conversation