<?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 to Delete Orphaned SAS SPDE tables on HDFS with PROC HADOOP in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/945729#M83665</link>
    <description>&lt;P&gt;I've never done it myself but... I guess it's a two step process. First figure out the name of the lock file, then delete the lock file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The link you've shared indicates that the lock file itself is likely under some /temp directory or wherever the SPDELOCKPATH environment variable points to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To delete the file here the docu link:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0sksf47t7lheen11ay3w7490o5x.htm#n0nj9w2t8wjxcwn19fp75ec5c3km" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0sksf47t7lheen11ay3w7490o5x.htm#n0nj9w2t8wjxcwn19fp75ec5c3km&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I found above docu entry very quickly because I first asked Copilot:&lt;/P&gt;
&lt;PRE&gt;Proc hadoop delete file&lt;/PRE&gt;
&lt;P&gt;And got the answer:&lt;/P&gt;
&lt;DIV class="content user-select-text" tabindex="0" aria-description="" aria-label="Sent by Copilot: To delete a file in Hadoop using the `PROC HADOOP` procedure in SAS, you can use the `HDFS` statement with the `DELETE` option. Here's an example of how you can do this:

```sas
proc hadoop;
   hdfs delete=&amp;quot;/path/to/your/file&amp;quot;;
run;
```

Replace `&amp;quot;/path/to/your/file&amp;quot;` with the actual path of the file you want to delete on the Hadoop Distributed File System (HDFS)[^4^].

If you have any specific questions or need further assistance, feel free to ask!"&gt;
&lt;DIV class="ac-container ac-adaptiveCard has-image"&gt;
&lt;DIV class="ac-textBlock"&gt;
&lt;P&gt;To delete a file in Hadoop using the &lt;CODE&gt;PROC HADOOP&lt;/CODE&gt; procedure in SAS, you can use the &lt;CODE&gt;HDFS&lt;/CODE&gt; statement with the &lt;CODE&gt;DELETE&lt;/CODE&gt; option. Here’s an example of how you can do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sas"&gt;&lt;SPAN class="hljs-keyword"&gt;proc hadoop;&lt;/SPAN&gt;
   hdfs &lt;SPAN class="hljs-keyword"&gt;delete&lt;/SPAN&gt;=&lt;SPAN class="hljs-string"&gt;"/path/to/your/file"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;run;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A class="tooltip-target" href="https://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/n0bj9541b5envsn1pitnekg1fvm3.htm" target="_blank" rel="noopener" data-citationid="de67dec5-6fbf-cc07-6ff3-77f563987065-14-group"&gt;Replace &lt;CODE&gt;"/path/to/your/file"&lt;/CODE&gt; with the actual path of the file you want to delete on the Hadoop Distributed File System (HDFS)&lt;/A&gt;&lt;A class="ac-anchor sup-target" href="https://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/n0bj9541b5envsn1pitnekg1fvm3.htm" target="_blank" rel="noopener" data-citationid="de67dec5-6fbf-cc07-6ff3-77f563987065-14" aria-label="1: &amp;quot;/path/to/your/file&amp;quot;"&gt;&lt;SUP class="citation-sup"&gt;1&lt;/SUP&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="ac-horizontal-separator" aria-hidden="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="ad-container"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2024 21:20:16 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2024-09-30T21:20:16Z</dc:date>
    <item>
      <title>How to Delete Orphaned SAS SPDE tables on HDFS with PROC HADOOP</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/945709#M83664</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems like I have some orphaned sas spde tables on HDFS preventing me to overwrite those tables with the below error message -&amp;nbsp;&lt;/P&gt;
&lt;DIV id="sasLogError1_1727713473483" class="sasError"&gt;ERROR: Unexpected lock failure on specified file.&lt;/DIV&gt;
&lt;DIV id="sasLogError2_1727713473483" class="sasError"&gt;ERROR: File EVAPS.xyz_1_202101.DATA has not been saved because copy could not be completed.&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;I see a post on sas which reads as below -&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;
&lt;H2 id="n1t31omitehugln193lvwcbiwvk6" class="xisDoc-title"&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_055/engspdehdfsug/p1gskewwxbo71jn1d7qs9mmmexjo.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_055/engspdehdfsug/p1gskewwxbo71jn1d7qs9mmmexjo.htm&lt;/A&gt;&lt;/H2&gt;
&lt;H2 class="xisDoc-title"&gt;Deleting Orphaned Lock Files&lt;/H2&gt;
&lt;P class="xisDoc-paragraph"&gt;In most situations, you do not see the lock directory because lock files are deleted when the process completes. However, in some situations, such as an abnormal termination of a SAS session, lock files might not be properly deleted. The leftover lock files could prohibit access to a data set. If this error occurs, you must manually delete the orphan lock file by submitting Hadoop commands. You can use the HADOOP procedure to submit Hadoop commands.&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Does anyone know the exact command to delete the orphaned spde tables using PROC HADOOP.&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;Thanks in advance.&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;RP&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE id="pre_sasLog_5038" class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 16:37:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/945709#M83664</guid>
      <dc:creator>prsr</dc:creator>
      <dc:date>2024-09-30T16:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Delete Orphaned SAS SPDE tables on HDFS with PROC HADOOP</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/945729#M83665</link>
      <description>&lt;P&gt;I've never done it myself but... I guess it's a two step process. First figure out the name of the lock file, then delete the lock file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The link you've shared indicates that the lock file itself is likely under some /temp directory or wherever the SPDELOCKPATH environment variable points to.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To delete the file here the docu link:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0sksf47t7lheen11ay3w7490o5x.htm#n0nj9w2t8wjxcwn19fp75ec5c3km" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0sksf47t7lheen11ay3w7490o5x.htm#n0nj9w2t8wjxcwn19fp75ec5c3km&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I found above docu entry very quickly because I first asked Copilot:&lt;/P&gt;
&lt;PRE&gt;Proc hadoop delete file&lt;/PRE&gt;
&lt;P&gt;And got the answer:&lt;/P&gt;
&lt;DIV class="content user-select-text" tabindex="0" aria-description="" aria-label="Sent by Copilot: To delete a file in Hadoop using the `PROC HADOOP` procedure in SAS, you can use the `HDFS` statement with the `DELETE` option. Here's an example of how you can do this:

```sas
proc hadoop;
   hdfs delete=&amp;quot;/path/to/your/file&amp;quot;;
run;
```

Replace `&amp;quot;/path/to/your/file&amp;quot;` with the actual path of the file you want to delete on the Hadoop Distributed File System (HDFS)[^4^].

If you have any specific questions or need further assistance, feel free to ask!"&gt;
&lt;DIV class="ac-container ac-adaptiveCard has-image"&gt;
&lt;DIV class="ac-textBlock"&gt;
&lt;P&gt;To delete a file in Hadoop using the &lt;CODE&gt;PROC HADOOP&lt;/CODE&gt; procedure in SAS, you can use the &lt;CODE&gt;HDFS&lt;/CODE&gt; statement with the &lt;CODE&gt;DELETE&lt;/CODE&gt; option. Here’s an example of how you can do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sas"&gt;&lt;SPAN class="hljs-keyword"&gt;proc hadoop;&lt;/SPAN&gt;
   hdfs &lt;SPAN class="hljs-keyword"&gt;delete&lt;/SPAN&gt;=&lt;SPAN class="hljs-string"&gt;"/path/to/your/file"&lt;/SPAN&gt;;
&lt;SPAN class="hljs-keyword"&gt;run;&lt;/SPAN&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A class="tooltip-target" href="https://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/n0bj9541b5envsn1pitnekg1fvm3.htm" target="_blank" rel="noopener" data-citationid="de67dec5-6fbf-cc07-6ff3-77f563987065-14-group"&gt;Replace &lt;CODE&gt;"/path/to/your/file"&lt;/CODE&gt; with the actual path of the file you want to delete on the Hadoop Distributed File System (HDFS)&lt;/A&gt;&lt;A class="ac-anchor sup-target" href="https://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/n0bj9541b5envsn1pitnekg1fvm3.htm" target="_blank" rel="noopener" data-citationid="de67dec5-6fbf-cc07-6ff3-77f563987065-14" aria-label="1: &amp;quot;/path/to/your/file&amp;quot;"&gt;&lt;SUP class="citation-sup"&gt;1&lt;/SUP&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="ac-horizontal-separator" aria-hidden="true"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="ad-container"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 21:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/945729#M83665</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-09-30T21:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Delete Orphaned SAS SPDE tables on HDFS with PROC HADOOP</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/946243#M83680</link>
      <description>&lt;P&gt;Thanks Patrick for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My table is in hdfs location as below -&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;hdfs://xxxxxx/warehouse/tablespace/external/hive/&lt;STRONG&gt;schema/table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I run the below code -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc hadoop;&lt;BR /&gt;hdfs delete="hdfs://xxxxx/warehouse/tablespace/external/hive/schema/tablename";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;Firstly, It asks to mention user name in the format (/user/username), when I do that it prefixes the /user/username to the given path, which results in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: message: File /user/xxxxxxx/hdfs://xxxxx/warehouse/tablespace/external/hive/schema/tablename does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;thanks, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;RP&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 09:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Delete-Orphaned-SAS-SPDE-tables-on-HDFS-with-PROC-HADOOP/m-p/946243#M83680</guid>
      <dc:creator>prsr</dc:creator>
      <dc:date>2024-10-04T09:59:40Z</dc:date>
    </item>
  </channel>
</rss>

