BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Anne_A
Quartz | Level 8

Dear all,

Is it possible to (programmatically or otherwise) find out which metadata object a specific uri (<8characters>.<8characters>) corresponds to? Just FYI the context is: I'm investigating the possibilities of PROC METALIB, and for a given URI (whose corresponding metadata object I would like to identify) it works, but not for others. Hence, retrieving which metadata object the "working URI" points to will hopefully help me understand why it (PROC METALIB) doesn't work in other cases.

Many TIA

Cheers

Anne.

1 ACCEPTED SOLUTION

Accepted Solutions
gwootton
SAS Super FREQ

You could use the ID to get attributes for the object, for example:

data _null_;
     length name type $ 255 id $ 17;
     call missing (of _character_);
     obj="omsobj:ID";
     rc=metadata_getattr(obj,"Name",name);
     rc=metadata_resolve(obj,type,id);
     put name= type= id=;
run;



Referencing a Metadata Object with a URI:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n10jctx8iblta9n17b4fwr7tawii.htm

METADATA_GETATTR function:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p1kjy5liyi86w8n1vfopazyeb70u.htm

METADATA_RESOLVE function:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n1lfiylg4nenwyn1oe66yco3sgly.htm

--
Greg Wootton | Principal Systems Technical Support Engineer

View solution in original post

2 REPLIES 2
gwootton
SAS Super FREQ

You could use the ID to get attributes for the object, for example:

data _null_;
     length name type $ 255 id $ 17;
     call missing (of _character_);
     obj="omsobj:ID";
     rc=metadata_getattr(obj,"Name",name);
     rc=metadata_resolve(obj,type,id);
     put name= type= id=;
run;



Referencing a Metadata Object with a URI:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n10jctx8iblta9n17b4fwr7tawii.htm

METADATA_GETATTR function:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p1kjy5liyi86w8n1vfopazyeb70u.htm

METADATA_RESOLVE function:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/n1lfiylg4nenwyn1oe66yco3sgly.htm

--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 949 views
  • 1 like
  • 2 in conversation