我有一个来自我的存储库的元数据对象列表。我已获取所有 SASLibrary、PhysicalTable、Jobs 对象。现在我需要获取他们的所有详细信息。有人可以建议我该怎么做吗?我是 SAS DI 新手,需要使用 SAS 代码获取详细信息。
谢谢
好的,假设你有一个数据集(have
)其中包含这些对象,并且 uri 存储在名为的变量中uri
那么以下内容就足够了:
data associations;
keep assoc assocuri name;
length assoc assocuri name $256;
set have;
rc1=1;n1=1;
do while(rc1>0);
/* Walk through all possible associations of this object. */
rc1=metadata_getnasl(uri,n1,assoc);
rc2=1;n2=1;
do while(rc2>0);
/* Walk through all the associations on this machine object. */
rc2=metadata_getnasn(uri,trim(assoc),n2,assocuri);
if (rc2>0) then do;
rc3=metadata_getattr(assocuri,"Name",name);
output;
end;
call missing(name,assocuri);
put arc= rc2=;
n2+1;
end;
n1+1;
end;
run;
proc sort data=associations;
by assoc name;
run;
proc sql;
create table groupassoc as
select assoc, count(*) as cnt
from associations
group by 1;
data attrprop;
keep type name value;
length type $4 name $256 value $32767;
set have;
rc1=1;n1=1;type='Prop';
do while(rc1>0);
rc1=metadata_getnprp(uri,n1,name,value);
if rc1>0 then output;
n1+1;
end;
rc1=1;n1=1;type='Attr';
do while(rc1>0);
rc1=metadata_getnatr(uri,n1,name,value);
if rc1>0 then output;
n1+1;
end;
run;
proc sort data=attrprop;
by type name;
run;
还可以使用以下方式获取此信息metabrowse
在 SAS 基地。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)