<?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: Programmatically deleting registered models from metadata server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971052#M377246</link>
    <description>&lt;P&gt;You could use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p02e3ara4110hcn1dei1tun4smmu.htm" target="_blank" rel="noopener"&gt;DATA step functions&lt;/A&gt; for reading and writing SAS metadata, but you would have to unpick the metadata data model to find and then delete the appropriate metadata. Please be aware that the possibility of corrupting your metadata repository is high when trialling updates. It is good practice to frequently take metadata backups and restore from these if you have problems.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jul 2025 21:37:45 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2025-07-17T21:37:45Z</dc:date>
    <item>
      <title>Programmatically deleting registered models from metadata server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/970968#M377209</link>
      <description>&lt;P&gt;I am trying to automate a model-creation process in SAS Enterprise Miner, meaning I can enter a variable as "ABC", click run and it will query appropriate data, build the models, and the final step of the flow is to register the new model on the Metadata Server by name. Let's call it "Model ABC".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This process works well, but the problem is that if I run this flow again, a new "Model ABC" is registered to the Metadata Server, in addition to the previously-created "Model ABC"s. So, if I look at the Metadata Server using the Management Console, I can see both "Model ABC" objects.&amp;nbsp; SAS doesn't overwrite registered models even if they are identically-named. If I right-click on their properties, both models have identical properties with the exception of:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ModelKey&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;MetadataUpdated&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;MetadataCreated&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Id&lt;BR /&gt;&lt;BR /&gt;This model-creation flow will be run frequently going forward for a wide range of input values (in addition to "ABC"), so I would like to avoid a massive builduip of identically-named models by deleting (via SAS Code node?) all models with name="Model ABC" from the Metadata Server prior to registering the model via the Register Model node.&lt;BR /&gt;&lt;BR /&gt;I know that models can programmatically be registered to the server via this macro:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/edmcdc/3.3/edmmacro/n0uu60vrx3zg3sn0zx59uqb0zm4a.htm#p17xeymfwwedtyn12mo4rjc6jmq7" target="_blank"&gt;SAS Help Center: %AA_Model_Register Autocall Macro&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But the only options I have been able to find for deleting a registered model is via the SAS EM or Management Console GUI:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/emag/15.3/n0ts0vnzg9b1vyn1xf8bn5fmhh4l.htm#n0caviym2lr5dun1sdngez8oeowl" target="_blank"&gt;SAS Help Center: SAS Enterprise Miner Model Package Registration&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone know of a way to &lt;STRONG&gt;programmatically&lt;/STRONG&gt; delete models from the Metadata Server?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 08:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/970968#M377209</guid>
      <dc:creator>Fibo1123</dc:creator>
      <dc:date>2025-07-17T08:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically deleting registered models from metadata server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971052#M377246</link>
      <description>&lt;P&gt;You could use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lrmeta/p02e3ara4110hcn1dei1tun4smmu.htm" target="_blank" rel="noopener"&gt;DATA step functions&lt;/A&gt; for reading and writing SAS metadata, but you would have to unpick the metadata data model to find and then delete the appropriate metadata. Please be aware that the possibility of corrupting your metadata repository is high when trialling updates. It is good practice to frequently take metadata backups and restore from these if you have problems.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2025 21:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971052#M377246</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-07-17T21:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically deleting registered models from metadata server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971067#M377249</link>
      <description>Thank you for the information. That was exactly what I was looking for.&lt;BR /&gt;&lt;BR /&gt;I will read everything carefully before I think about modifying the metadata repository. Thank you for the warning.</description>
      <pubDate>Fri, 18 Jul 2025 01:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971067#M377249</guid>
      <dc:creator>Fibo1123</dc:creator>
      <dc:date>2025-07-18T01:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically deleting registered models from metadata server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971070#M377250</link>
      <description>&lt;P&gt;The Metadata Browser (invoke with the metabrowse command) in the SAS Windowing Environment is particularly useful for navigating the data structures:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1752802834164.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108443i3E8A734C54801876/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1752802834164.png" alt="SASKiwi_0-1752802834164.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 01:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programmatically-deleting-registered-models-from-metadata-server/m-p/971070#M377250</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-07-18T01:40:57Z</dc:date>
    </item>
  </channel>
</rss>

