SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Delete registerred metadata table

Reply
Super Contributor
Posts: 308

Delete registerred metadata table

Dear All,

 

How can I delete registered tables from metadata library using sas code?

 

I know that using
 update_rule=(delete) within proc metalib procedure deletes the table if they no longer exists in the physical path

but i want to keep them in the physical path.

 

10x

Super User
Posts: 5,424

Re: Delete registerred metadata table

Even if I have never used it, I would be very surprised if PROC METALIB would delete any physical data.

Data never sleeps
Super Contributor
Posts: 308

Re: Delete registerred metadata table

PROC METALIB does not delete the physical data but if the table exists in the physical path it does not remove it from

the metadata library .

 

For wxample , I have library test defined in metadata with the following properties:

 - location /Shared Data

 - selected items - /path/test

 

I have registered the table class in this library and now I want to delete it from the library but still keep it in the /path/test .

 

how can I do it?

Super User
Posts: 3,250

Re: Delete registerred metadata table

You can easily delete a registered table in SAS Management Console without affecting the physical original. 

Super Contributor
Posts: 308

Re: Delete registerred metadata table

I know but it is not a choice. We have many libraries and a lot of tables registered in each of them.

We need a programming approach.

Super User
Posts: 3,250

Re: Delete registerred metadata table

What about going through the entire library using an EXCLUDE statement to not process the tables you do not want registered?

 

proc metalib;
     omr (libid="XXXXXXX");
  exclude table1 table2......;
run;

Personally I avoid registering tables in metadata where possible so I don't have these administration problems Smiley Happy

Ask a Question
Discussion stats
  • 5 replies
  • 674 views
  • 0 likes
  • 3 in conversation