本文介绍了调整元数据 URI 以排除工作表元数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经构建了以下代码,用于从元数据中获取 SAS 注册表的列表.它工作正常,但由于大量的工作表(a PhysicalTable 的子类型):
I've built the code below for getting a list of SAS registered tables from metadata. It works fine but takes a long time to run due to the large volume of WorkTables (a subtype of PhysicalTable):
data work.tables (keep=uri name);
length uri name $256;
n=1;
do while(metadata_getnobj("omsobj:PhysicalTable?@Id contains '.'",n,uri)>=0);
n+1;
if substr(uri,8,9)='WorkTable' then continue;
if metadata_getattr(uri, "SASTableName", name)=0 then output;
end;
run;
有什么办法可以调整uri,以便在元数据查询本身中排除WorkTable类型吗?
Is there any way to adjust the uri so that the WorkTable type can be excluded in the metadata query itself?
例如如下(不起作用):
Eg as follows (doesn't work):
omsobj:PhysicalTable?@Id contains '.' and @MetadataType ne 'WorkTable'
推荐答案
所以下面的 URI 起到了作用,虽然它只快了 20%:
So the following URI did the trick, although it was only 20% faster:
omsobj:PhysicalTable?@Id contains '.' and @PublicType = 'Table'
这当然可以缩短为:
omsobj:PhysicalTable?@PublicType = 'Table'
这减少了额外的 0.2 秒.
Which shaved off an extra 0.2 seconds.
这篇关于调整元数据 URI 以排除工作表元数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!