BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DrBoogie
Obsidian | Level 7

Hi all, sorry for a stupid question, but could You please briefly explain me what is the purpose of proc metalib? I have never used it myself and now I inherited a program where it is used (with the update_rule=delete). So, the table definition in the metadata is deleted although the table remains physically existing. Why would someone do so? I don't understand this. 😞

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12

Proc metalib is used to update the metadata about tables with new information from the physical properties. It is what secretly happens if you use the import metadata function in management console or data integration studio. But using this proc you can do it programmatically.

 

The update_rule=delete option will result in deletion of the metadata registration of a table if that table no longer exists in the data source. So the metadata is removed if the table no longer exists in the physical world. This may or may not be what you want so you get to choose.

 

Proc metalib is extensively documented here.

 

Hope this helps,

- Jan.

 

PS: This is not a stupid question AT ALL. I rarely see stupid questions, if at all. Stupid answers are more abundant.

View solution in original post

3 REPLIES 3
jennifert
SAS Employee

Hi @DrBoogie,

 

Have you seen the documentation for the METALIB procedure?

METALIB Procedure

 

In the Examples drop-down list, the 2nd example (Synchronizing Metadata with the Data Source) includes use of the UPDATE_RULE statement with the DELETE argument.  In this case, it looks like the statement is used to delete obsolete metadata that no longer corresponds to a table in the library. Could that be the case in your program as well?

 

I hope that helps!

thanks,

Jennifer


Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF

jklaverstijn
Rhodochrosite | Level 12

Proc metalib is used to update the metadata about tables with new information from the physical properties. It is what secretly happens if you use the import metadata function in management console or data integration studio. But using this proc you can do it programmatically.

 

The update_rule=delete option will result in deletion of the metadata registration of a table if that table no longer exists in the data source. So the metadata is removed if the table no longer exists in the physical world. This may or may not be what you want so you get to choose.

 

Proc metalib is extensively documented here.

 

Hope this helps,

- Jan.

 

PS: This is not a stupid question AT ALL. I rarely see stupid questions, if at all. Stupid answers are more abundant.

DrBoogie
Obsidian | Level 7

Thank You. My problem is probably that I don't really understand the purpose and advantage of metadata itself. I am working as a SAS programmer since 2007 but I never had much to do with metadata. And all what I done worked well without. 🙂 I understand that for example in the scope of Data Integration metadata is essential. Or if there are many users who have access to the data I could imagine that metadata can help organize processes in a secure way.  But as for "normal" processes of data manipulation with only very few users (which is the case at my place) it seems not really that usefull for me.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2124 views
  • 2 likes
  • 3 in conversation