<?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 Re: SAS Viya metadata query in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731366#M870</link>
    <description>If you want to pull information programmatically from Viya you can use the sas-admin CLI or REST APIs. I think I've put a few programs out there to get information on users and groups already from the identities microservice. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-Creation-Date/td-p/723793" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-Creation-Date/td-p/723793&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/Metadata-scripts-for-SAS-Viya/td-p/668751" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/Metadata-scripts-for-SAS-Viya/td-p/668751&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;For library and table data you could do something similar from the CAS administration microservices or CAS directly. &lt;BR /&gt;&lt;BR /&gt;Using SAS Administration Command-Line Utility:&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=calcdc&amp;amp;cdcVersion=3.5&amp;amp;docsetId=calcli&amp;amp;docsetTarget=n01xwtcatlinzrn1gztsglukb34a.htm&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?cdcId=calcdc&amp;amp;cdcVersion=3.5&amp;amp;docsetId=calcli&amp;amp;docsetTarget=n01xwtcatlinzrn1gztsglukb34a.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Using REST APIs to get library/table info:&lt;BR /&gt;&lt;A href="https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-sources" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-sources&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-tables" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-tables&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 05 Apr 2021 14:32:28 GMT</pubDate>
    <dc:creator>gwootton</dc:creator>
    <dc:date>2021-04-05T14:32:28Z</dc:date>
    <item>
      <title>SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725430#M843</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Did I understand correctly that the 'traditional' metadata data step queries are no longer working in SAS Viya? Are there any alternatives to get the same functionality?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Berry&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 13:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725430#M843</guid>
      <dc:creator>BerryH</dc:creator>
      <dc:date>2021-03-11T13:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725561#M845</link>
      <description>&lt;P&gt;Correct. There is no SAS 9 - style metadata in Viya. What type of metadata did you have in mind?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 19:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725561#M845</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-11T19:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725726#M846</link>
      <description>&lt;P&gt;Ok, thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We now use for example metadata queries to extract information about extended attributes for tables, information about which users are in which groups, information about defined libraries and configured options, etc.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 08:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725726#M846</guid>
      <dc:creator>BerryH</dc:creator>
      <dc:date>2021-03-12T08:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725993#M848</link>
      <description>&lt;P&gt;What about using the SAS DICTIONARY tables for info on libraries and tables? As I understand it there is a SAS V9 workspace server in Viya which should support these. Unfortunately I don't have access to Viya to test this.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 21:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/725993#M848</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-12T21:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731347#M869</link>
      <description>&lt;P&gt;Perhaps this is possible. However, in my experience the data step metadata queries are able to retrieve more metadata information than the dictionary tables.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 13:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731347#M869</guid>
      <dc:creator>BerryH</dc:creator>
      <dc:date>2021-04-05T13:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731366#M870</link>
      <description>If you want to pull information programmatically from Viya you can use the sas-admin CLI or REST APIs. I think I've put a few programs out there to get information on users and groups already from the identities microservice. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-Creation-Date/td-p/723793" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/SAS-VIYA-Fetching-List-of-Users-Groups-Creation-Date/td-p/723793&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Administration-and-Deployment/Metadata-scripts-for-SAS-Viya/td-p/668751" target="_blank"&gt;https://communities.sas.com/t5/Administration-and-Deployment/Metadata-scripts-for-SAS-Viya/td-p/668751&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;For library and table data you could do something similar from the CAS administration microservices or CAS directly. &lt;BR /&gt;&lt;BR /&gt;Using SAS Administration Command-Line Utility:&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=calcdc&amp;amp;cdcVersion=3.5&amp;amp;docsetId=calcli&amp;amp;docsetTarget=n01xwtcatlinzrn1gztsglukb34a.htm&amp;amp;locale=en" target="_blank"&gt;https://go.documentation.sas.com/?cdcId=calcdc&amp;amp;cdcVersion=3.5&amp;amp;docsetId=calcli&amp;amp;docsetTarget=n01xwtcatlinzrn1gztsglukb34a.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Using REST APIs to get library/table info:&lt;BR /&gt;&lt;A href="https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-sources" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-sources&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-tables" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/DataManagement/#data-tables&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2021 14:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731366#M870</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2021-04-05T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731373#M871</link>
      <description>&lt;P&gt;Thanks Greg, very helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 14:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/731373#M871</guid>
      <dc:creator>BerryH</dc:creator>
      <dc:date>2021-04-05T14:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Viya metadata query</title>
      <link>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/735432#M886</link>
      <description>&lt;P&gt;I read in your post that you're after metadata and I think: "extract information about extended attributes for tables".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the CLI and REST APIs mentioned in the answer in this post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just recently I had to pull out 'metadata' for some CAS tables, specifically the columns, type and lengths. I needed this information to help me code a CAS Star Schema view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did this using SAS9 code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get this CAS table information a couple of ways in SAS 9 code:&lt;/P&gt;
&lt;P&gt;1) using Proc CASUtil, with the contents statement &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casref/p0e32z0e8q5ge6n1fk1u8cuhzj4g.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casref/p0e32z0e8q5ge6n1fk1u8cuhzj4g.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This returns output similar to the proc contents;&lt;/P&gt;
&lt;P&gt;2) Using Proc CAS with the table.tabledetails actionset. Note that this action set may not be available in earlier versions of 9.4M5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can wrap your proc code with ods statements to get the output into datasets like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let table=FACT_XXX;&lt;/P&gt;
&lt;P&gt;/*ods trace on;*/&lt;/P&gt;
&lt;P&gt;ods output&amp;nbsp; TableInfo=TableInfo;&lt;/P&gt;
&lt;P&gt;ods output&amp;nbsp; TableDetails=TableDetails;&lt;/P&gt;
&lt;P&gt;ods output&amp;nbsp; ColumnInfo=ColumnInfo;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;casutil&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contents incaslib="dev_AAAA" casdata="&amp;amp;table";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods trace off;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could then post process the ColumnInfo dataset and used that to generate code for creating a star schema view&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/SAS-Viya-metadata-query/m-p/735432#M886</guid>
      <dc:creator>MarkBodt_NZ</dc:creator>
      <dc:date>2021-04-20T06:32:23Z</dc:date>
    </item>
  </channel>
</rss>

