<?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: Delete registerred metadata table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/434147#M13448</link>
    <description>&lt;P&gt;I'm bumping this question since I have the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen this workaround:&lt;/P&gt;&lt;P&gt;* Rename the physical table&lt;/P&gt;&lt;P&gt;* Run metalib (will delete metadata table because physical table has another name)&lt;/P&gt;&lt;P&gt;* Rename the physical table to original name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround doesn't work for me since the physical table is stored in Hadoop and those tables can not be renamed (at least not with proc datasetes).&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2018 12:58:26 GMT</pubDate>
    <dc:creator>Fredrik_Hansson</dc:creator>
    <dc:date>2018-02-05T12:58:26Z</dc:date>
    <item>
      <title>Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267953#M7436</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete registered tables from metadata library using sas code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that using&lt;BR /&gt;&amp;nbsp;&lt;STRONG&gt;update_rule=(delete)&lt;/STRONG&gt; within &lt;STRONG&gt;proc metalib&lt;/STRONG&gt; procedure deletes the table if they no longer exists in the physical path&lt;/P&gt;&lt;P&gt;but i want to keep them in the physical path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10x&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 14:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267953#M7436</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-05-03T14:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267955#M7437</link>
      <description>&lt;P&gt;Even if I have never used it, I would be very surprised&amp;nbsp;if PROC METALIB would delete&amp;nbsp;any physical data.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 14:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267955#M7437</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-03T14:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267963#M7438</link>
      <description>&lt;P&gt;PROC METALIB does not delete the physical data but if the table exists in the physical path it does not remove it from&lt;/P&gt;&lt;P&gt;the metadata library .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For wxample , I have library &lt;STRONG&gt;test&lt;/STRONG&gt; defined in metadata with the following properties:&lt;/P&gt;&lt;P&gt;&amp;nbsp;-&amp;nbsp;&lt;STRONG&gt;location&lt;/STRONG&gt; /Shared Data&lt;/P&gt;&lt;P&gt;&amp;nbsp;- &lt;STRONG&gt;selected items - &lt;/STRONG&gt;/path/test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have registered the table &lt;STRONG&gt;class &lt;/STRONG&gt;in this library and now I want to delete it from the library but still keep it in the &lt;STRONG&gt;/path/test &lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I do it?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 14:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/267963#M7438</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-05-03T14:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268069#M7440</link>
      <description>&lt;P&gt;You can easily delete a registered table in SAS Management Console without affecting the physical original.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 20:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268069#M7440</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-05-03T20:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268201#M7442</link>
      <description>&lt;P&gt;I know but it is not a choice. We have many libraries and a lot of tables registered in each of them.&lt;/P&gt;&lt;P&gt;We need a programming approach.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 07:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268201#M7442</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2016-05-04T07:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268386#M7452</link>
      <description>&lt;P&gt;What about going through the entire library using an EXCLUDE statement to not process the tables you do not want registered?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc metalib;
     omr (libid="XXXXXXX");
  exclude table1 table2......;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Personally I avoid registering tables in metadata where possible so I don't have these administration problems&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 21:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/268386#M7452</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-05-04T21:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/434147#M13448</link>
      <description>&lt;P&gt;I'm bumping this question since I have the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen this workaround:&lt;/P&gt;&lt;P&gt;* Rename the physical table&lt;/P&gt;&lt;P&gt;* Run metalib (will delete metadata table because physical table has another name)&lt;/P&gt;&lt;P&gt;* Rename the physical table to original name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround doesn't work for me since the physical table is stored in Hadoop and those tables can not be renamed (at least not with proc datasetes).&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 12:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/434147#M13448</guid>
      <dc:creator>Fredrik_Hansson</dc:creator>
      <dc:date>2018-02-05T12:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delete registerred metadata table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/434172#M13449</link>
      <description>&lt;P&gt;Quick and dirty solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	length uri $256 ;
	call missing(uri, nobj);

	* Get URI for table I want to delete	;
	nobj=metadata_getnobj("omsobj:DataTable?@Name='stg_DT_HJARTA'",1,uri);

	* Delete table	;
	rc = METADATA_DELOBJ(uri);

	* Output for debug purposes ;
	put nobj= rc=;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Be careful!&lt;/P&gt;&lt;P&gt;This solution will delete&lt;STRONG&gt; the first&lt;/STRONG&gt; table found named "stg_DT_HJARTA". &lt;STRONG&gt;Not all&lt;/STRONG&gt; tables&amp;nbsp;&lt;SPAN&gt;named "&lt;/SPAN&gt;&lt;SPAN&gt;stg_DT_HJARTA".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is no error handling. The code will not give ERRORs or WARNINGs if it fails.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If someone knows the syntax for specyfing the folder path in the query, I'd apriciate it. I'ld like something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;nobj=metadata_getnobj("omsobj:DataTable?@Name='stg_DT_HJARTA' and @path='/Shared Data/Project XYZ'",1,uri);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Feb 2018 14:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Delete-registerred-metadata-table/m-p/434172#M13449</guid>
      <dc:creator>Fredrik_Hansson</dc:creator>
      <dc:date>2018-02-05T14:14:34Z</dc:date>
    </item>
  </channel>
</rss>

