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)
);
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.