<?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: How extract mapping columns (the relationship from the source to target) from metadata by using in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-extract-mapping-columns-the-relationship-from-the-source-to/m-p/474732#M14887</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9046"&gt;@LuisValença&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;It's&amp;nbsp;nothing I'd attempt doing as it's going to become quite involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing you've got to figure out is where in Metadata this information is stored. Once you've got this you need to write the code to actually query metadata and pull out this information (SAS data step or Proc Metadata).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got two approaches to figure out where stuff lives in SAS Metadata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A: Analyse XML&lt;/P&gt;
&lt;P&gt;Export your job (.spk), then open this .spk with WinZip or the like, find the relevant XML and search for your expression. Then analyse the XML to figure out the Tag hierarchies as this will tell you how to query metadata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B: Use Metabrowse&lt;/P&gt;
&lt;P&gt;Use PC SAS and use METABROWSE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 262px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21516i31A48C0FE289B8E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dive into the trees to find your expression:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21517iAE0E6D3486FFA168/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Jul 2018 03:31:54 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-07-01T03:31:54Z</dc:date>
    <item>
      <title>How extract mapping columns (the relationship from the source to target) from metadata by using DIS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-extract-mapping-columns-the-relationship-from-the-source-to/m-p/473455#M14854</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a transformation inside a job, in DIS, which uses a table to create a new table with a new field which is the concatenation of two fields from the source table&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source table:&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;Postal Code (Postal_Code)&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;2775-001&lt;/P&gt;
&lt;P&gt;Postal Code&amp;nbsp;Name&amp;nbsp; (Postal_Code_Name)&amp;nbsp;&amp;nbsp; PAREDE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Target:&lt;/P&gt;
&lt;P&gt;.....&lt;/P&gt;
&lt;P&gt;Postal Code (Postal_Code)&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;2775-001&lt;/P&gt;
&lt;P&gt;Postal Code&amp;nbsp;Name&amp;nbsp; (Postal_Code_Name)&amp;nbsp;&amp;nbsp; PAREDE&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Postal Code Description (Postal_Code_Desc)&amp;nbsp;&amp;nbsp; 2775-001 PAREDE (New field)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How extract, from metadata, this relationship?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I intended to get the following relationships for fields&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Src (Postal_Code) -&amp;gt; Tgt (Postal_code)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Src(Postal_Code_Name) -&amp;gt; Tgt(Postal_Code_Name)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Src (Postal_Code) -&amp;gt; Tgt (Postal_Code_Desc)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Src (Postal_Code_Name) -&amp;gt; Tgt (Postal_Code_Desc)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where &lt;STRONG&gt;Src&lt;/STRONG&gt; means Source and &lt;STRONG&gt;Tgt&lt;/STRONG&gt; menas Target.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 16:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-extract-mapping-columns-the-relationship-from-the-source-to/m-p/473455#M14854</guid>
      <dc:creator>LuisValença</dc:creator>
      <dc:date>2018-06-26T16:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How extract mapping columns (the relationship from the source to target) from metadata by using</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-extract-mapping-columns-the-relationship-from-the-source-to/m-p/474732#M14887</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9046"&gt;@LuisValença&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;It's&amp;nbsp;nothing I'd attempt doing as it's going to become quite involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first thing you've got to figure out is where in Metadata this information is stored. Once you've got this you need to write the code to actually query metadata and pull out this information (SAS data step or Proc Metadata).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've got two approaches to figure out where stuff lives in SAS Metadata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A: Analyse XML&lt;/P&gt;
&lt;P&gt;Export your job (.spk), then open this .spk with WinZip or the like, find the relevant XML and search for your expression. Then analyse the XML to figure out the Tag hierarchies as this will tell you how to query metadata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B: Use Metabrowse&lt;/P&gt;
&lt;P&gt;Use PC SAS and use METABROWSE&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 262px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21516i31A48C0FE289B8E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dive into the trees to find your expression:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21517iAE0E6D3486FFA168/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 03:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-extract-mapping-columns-the-relationship-from-the-source-to/m-p/474732#M14887</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-07-01T03:31:54Z</dc:date>
    </item>
  </channel>
</rss>

