Desktop productivity for business analysts and programmers

The purpose of proc metalib

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

The purpose of proc metalib

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. Smiley Sad

Thanks in advance.


Accepted Solutions
Solution
4 weeks ago
Valued Guide
Posts: 530

Re: The purpose of proc metalib

[ Edited ]

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


All Replies
SAS Employee
Posts: 67

Re: The purpose of proc metalib

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

Solution
4 weeks ago
Valued Guide
Posts: 530

Re: The purpose of proc metalib

[ Edited ]

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.

Occasional Contributor
Posts: 16

Re: The purpose of proc metalib

Posted in reply to jklaverstijn

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. Smiley Happy 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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 136 views
  • 2 likes
  • 3 in conversation