Hi Community,
I'm using LIBNAME statement and datstep to load a Table to the LASR Server. The environment is distributed.
It is executing successfully (verified in the log), but I'm unable to see the table under "SAS Public LASR Server Library"
Thanks a lot for all your help.
That's correct, you have to use proc metalib in order to register LASR table on the metadata server. Please see an example below:
/* Register Table Macro */
%macro registertable( REPOSITORY=Foundation, REPOSID=, LIBRARY=, TABLE=, FOLDER=, TABLEID=, PREFIX= );
/* Mask special characters */
%let REPOSITORY=%superq(REPOSITORY);
%let LIBRARY =%superq(LIBRARY);
%let FOLDER =%superq(FOLDER);
%let TABLE =%superq(TABLE);
%let REPOSARG=%str(REPNAME="&REPOSITORY.");
%if ("&REPOSID." ne "") %THEN %LET REPOSARG=%str(REPID="&REPOSID.");
%if ("&TABLEID." ne "") %THEN %LET SELECTOBJ=%str(&TABLEID.);
%else %LET SELECTOBJ=&TABLE.;
%if ("&FOLDER." ne "") %THEN
%PUT INFO: Registering &FOLDER./&SELECTOBJ. to &LIBRARY. library.;
%else
%PUT INFO: Registering &SELECTOBJ. to &LIBRARY. library.;
proc metalib;
omr (
library="&LIBRARY."
%str(&REPOSARG.)
);
%if ("&TABLEID." eq "") %THEN %DO;
%if ("&FOLDER." ne "") %THEN %DO;
folder="&FOLDER.";
%end;
%end;
%if ("&PREFIX." ne "") %THEN %DO;
prefix="&PREFIX.";
%end;
select ("&SELECTOBJ.");
run;
quit;
%mend;
How to use this macro?
/* Synchronize table registration */
%registerTable(
LIBRARY=%nrstr(/Shared Data/SAS Visual Analytics/Public/Visual Analytics Public LASR)
, REPOSITORY=%nrstr(Foundation)
, TABLE=%nrstr(<REPLACE_WITH_TABLE_NAME>)
, FOLDER=%nrstr(/Shared Data/SAS Visual Analytics/Public/LASR)
);
Thank you very much. This was very helpful.
Just an fyi, if TABLE name needs to be in a macro, it is better to use %str
Thank you once again.
/* Synchronize table registration */
%registerTable(
LIBRARY=%nrstr(/Shared Data/SAS Visual Analytics/Public/Visual Analytics Public LASR)
, REPOSITORY=%nrstr(Foundation)
, TABLE=%str(&Original_Table)
);
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.