<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to add Description to a LASR table when loading it via code and not through Visual Analytics ADM in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457867#M9998</link>
    <description>&lt;P&gt;Hello everyone,&amp;nbsp; in advance I apologize if this post in a wrong location.&amp;nbsp; I have been working to develop a process (using SAS Macro and code) to unload and load data into LASR.&amp;nbsp; I have had success doing it via this code&lt;/P&gt;&lt;PRE&gt;%macro loadLasr(LibName, LibLASR_Name, LibraryPath, LASR_FolderPath, TableName, LASR_TName, );
    /*Load data into LASR*/
	DATA &amp;amp;LibLASR_Name..&amp;amp;LASR_TName;
    	set &amp;amp;LibName..&amp;amp;TableName;
	run;
    /*Register data into Metadata*/
	PROC METALIB;
		omr(library = &amp;amp;LibraryPath);
		folder= &amp;amp;LASR_FolderPath;
		select=(&amp;amp;LASR_TName);
	run;  
%mend loadLasr;&lt;/PRE&gt;&lt;P&gt;It works but I also want to add the Description to it.&amp;nbsp; When I load a table into LASR via Visual Analytics Administrator tool then I can add the description but when I unload and then reload the tables through code I will loose the description.&amp;nbsp; I want to know if I can add the description as a parameter to above code to be added to the LASR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your info and help&lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2018 18:36:41 GMT</pubDate>
    <dc:creator>L2Fly</dc:creator>
    <dc:date>2018-04-26T18:36:41Z</dc:date>
    <item>
      <title>How to add Description to a LASR table when loading it via code and not through Visual Analytics ADM</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457867#M9998</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp; in advance I apologize if this post in a wrong location.&amp;nbsp; I have been working to develop a process (using SAS Macro and code) to unload and load data into LASR.&amp;nbsp; I have had success doing it via this code&lt;/P&gt;&lt;PRE&gt;%macro loadLasr(LibName, LibLASR_Name, LibraryPath, LASR_FolderPath, TableName, LASR_TName, );
    /*Load data into LASR*/
	DATA &amp;amp;LibLASR_Name..&amp;amp;LASR_TName;
    	set &amp;amp;LibName..&amp;amp;TableName;
	run;
    /*Register data into Metadata*/
	PROC METALIB;
		omr(library = &amp;amp;LibraryPath);
		folder= &amp;amp;LASR_FolderPath;
		select=(&amp;amp;LASR_TName);
	run;  
%mend loadLasr;&lt;/PRE&gt;&lt;P&gt;It works but I also want to add the Description to it.&amp;nbsp; When I load a table into LASR via Visual Analytics Administrator tool then I can add the description but when I unload and then reload the tables through code I will loose the description.&amp;nbsp; I want to know if I can add the description as a parameter to above code to be added to the LASR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your info and help&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457867#M9998</guid>
      <dc:creator>L2Fly</dc:creator>
      <dc:date>2018-04-26T18:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457876#M9999</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/125625"&gt;@L2Fly&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  rc=metadata_setattr("omsobj:PhysicalTable?@Name='&amp;lt;REPLACE_WITH_TABLE_NAME&amp;gt;'","Desc","&amp;lt;YOUR_COMMENT&amp;gt;");
  put rc=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457876#M9999</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2018-04-26T18:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457956#M10000</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41748"&gt;@alexal&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very new into SAS and SAS programming so something like this would work?&amp;nbsp;&amp;nbsp; Based on your code I found this &lt;A href="http://support.sas.com/documentation/cdl/en/lrmeta/60739/HTML/default/viewer.htm#setattr.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrmeta/60739/HTML/default/viewer.htm#setattr.htm&lt;/A&gt; but not sure "PhysicalTable" refers to my parameter TableName ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro loadLasr(LibName, LibLASR_Name, LibraryPath, LASR_FolderPath, TableName, LASR_TName, );
    /*Load data into LASR*/
	DATA &amp;amp;LibLASR_Name..&amp;amp;LASR_TName;
    	set &amp;amp;LibName..&amp;amp;TableName;
	run;
	data _null_;
  		rc=metadata_setattr("omsobj:PhysicalTable?@Name="&amp;amp;LASR_TName,"Desc","testing");
  		put rc=;
	run;

    /*Register data into Metadata*/
	PROC METALIB;
		omr(library = &amp;amp;LibraryPath);
		folder= &amp;amp;LASR_FolderPath;
		select=(&amp;amp;LASR_TName);
	run;  
%mend loadLasr;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Apr 2018 20:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457956#M10000</guid>
      <dc:creator>L2Fly</dc:creator>
      <dc:date>2018-04-26T20:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457975#M10001</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/125625"&gt;@L2Fly&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will be &amp;amp;LASR_TName. Also, make sure that you have executed that code after proc metalib. Otherwise, you won't have anything to change.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 21:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457975#M10001</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2018-04-26T21:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457983#M10002</link>
      <description>&lt;P&gt;I am sure I am not doing this correctly, log indicates&lt;/P&gt;&lt;P&gt;NOTE: 0 tables listed in the SELECT or EXCLUDE statement were not found in either the metadata or the data source.&lt;/P&gt;&lt;P&gt;NOTE: 0 other tables were not processed due to error or UPDATE_RULE.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE METALIB used (Total process time):&lt;/P&gt;&lt;P&gt;real time 1.70 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;rc=-3&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro loadLasr(LibName, LibLASR_Name, LibraryPath, LASR_FolderPath, TableName, LASR_TName );
    /*Load data into LASR*/
	DATA &amp;amp;LibLASR_Name..&amp;amp;LASR_TName;
    	set &amp;amp;LibName..&amp;amp;TableName;
	run;

    /*Register data into Metadata*/
	PROC METALIB;
		omr(library = &amp;amp;LibraryPath);
		folder= &amp;amp;LASR_FolderPath;
		select=(&amp;amp;LASR_TName);
	run;  

	data _null_;
  		rc=metadata_setattr("omsobj:&amp;amp;LASR_TName?@Name=&amp;amp;LASR_TName","Desc","testing");
  		put rc=;
	run;
%mend loadLasr;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 22:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457983#M10002</guid>
      <dc:creator>L2Fly</dc:creator>
      <dc:date>2018-04-26T22:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457996#M10006</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/125625"&gt;@L2Fly&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-3 means "No objects match the URI.". Make sure that the table has been registered in the metadata. I'm using the following macro to do that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* 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="&amp;amp;REPOSITORY.");
   %if ("&amp;amp;REPOSID." ne "") %THEN %LET REPOSARG=%str(REPID="&amp;amp;REPOSID.");

   %if ("&amp;amp;TABLEID." ne "") %THEN %LET SELECTOBJ=%str(&amp;amp;TABLEID.);
   %else                         %LET SELECTOBJ=&amp;amp;TABLE.;

   %if ("&amp;amp;FOLDER." ne "") %THEN
      %PUT INFO: Registering &amp;amp;FOLDER./&amp;amp;SELECTOBJ. to &amp;amp;LIBRARY. library.;
   %else
      %PUT INFO: Registering &amp;amp;SELECTOBJ. to &amp;amp;LIBRARY. library.;

   proc metalib;
      omr (
         library="&amp;amp;LIBRARY." 
         %str(&amp;amp;REPOSARG.) 
          ); 
      %if ("&amp;amp;TABLEID." eq "") %THEN %DO;
         %if ("&amp;amp;FOLDER." ne "") %THEN %DO;
            folder="&amp;amp;FOLDER.";
         %end;
      %end;
      %if ("&amp;amp;PREFIX." ne "") %THEN %DO;
         prefix="&amp;amp;PREFIX.";
      %end;
      select ("&amp;amp;SELECTOBJ."); 
   run; 
   quit;

%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is usage example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Synchronize table registration */
%registerTable(
     LIBRARY=%nrstr(/Shared Data/SAS Visual Analytics/Public/Visual Analytics Public LASR)
   , REPOSITORY=%nrstr(Foundation)
   , TABLE=%nrstr(CARS)
   , FOLDER=%nrstr(/Shared Data/SAS Visual Analytics/Public/LASR)
   );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Apr 2018 00:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/457996#M10006</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2018-04-27T00:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add Description to a LASR table when loading it via code and not through Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/458166#M10009</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41748"&gt;@alexal&lt;/a&gt;&amp;nbsp;for your help.&amp;nbsp; I will take a look and try to do the same in my environment.&amp;nbsp; Will keep you posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-add-Description-to-a-LASR-table-when-loading-it-via-code/m-p/458166#M10009</guid>
      <dc:creator>L2Fly</dc:creator>
      <dc:date>2018-04-27T15:22:42Z</dc:date>
    </item>
  </channel>
</rss>

