<?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: Teradata row not delivered (trget): No more spool space in udkdw02 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Teradata-row-not-delivered-trget-No-more-spool-space-in-udkdw02/m-p/886354#M350251</link>
    <description>&lt;P&gt;This looks like Teradata not having sufficient work space. I'd raise this with your SAS admin or eventually directly with your Teradata DBA.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's possible that changing the readbuff option to a lower value would also allow the SQL to execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a where clause in your Proc Summary code that doesn't exist in your SQL code. We also can't know what code exactly SAS sends to the database for execution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you add below options to your code then you'll get in the SAS log what SAS sends to Teradata for in-database execution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token keyword"&gt;options&lt;/SPAN&gt;&lt;SPAN&gt; sastrace&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;',,,d'&lt;/SPAN&gt;&lt;SPAN&gt; sastraceloc&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;saslog nostsuffix&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2023 07:32:42 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-07-26T07:32:42Z</dc:date>
    <item>
      <title>Teradata row not delivered (trget): No more spool space in udkdw02</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-row-not-delivered-trget-No-more-spool-space-in-udkdw02/m-p/886352#M350249</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to calculate for each loan ID&amp;nbsp; (Field&amp;nbsp;&lt;CODE class=" language-sas"&gt;Agreement_Account_Id)&amp;nbsp;the&amp;nbsp;max&amp;nbsp;Fund_Actual_Payment_Count.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;I&amp;nbsp;run&amp;nbsp;it&amp;nbsp;in&amp;nbsp;SAS&amp;nbsp;and&amp;nbsp;I&amp;nbsp;get&amp;nbsp;an&amp;nbsp;error&amp;nbsp;"&lt;/CODE&gt;Teradata row not delivered (trget): No more spool space in udkdw02".&lt;/P&gt;
&lt;P&gt;What should I do in order to run successful query that calculate max for each loan ID?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that the raw data data set contain&amp;nbsp;508,264,076 rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table VBM410_ACTIVE_LOAN_BAL as
select Agreement_Account_Id,
       MAX(Fund_Actual_Payment_Count) as  Mis_Tash_Paid 
FROM TeraData.VBM410_ACTIVE_LOAN_BAL
group by Agreement_Account_Id 
;
quit;
/*ERROR: Teradata row not delivered (trget): No more spool space in udkdw02.*/
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I run it via proc summary then it is running well!&lt;/P&gt;
&lt;P&gt;My questions:&lt;/P&gt;
&lt;P&gt;Why proc sql is not working well here?&lt;/P&gt;
&lt;P&gt;Is there better&amp;nbsp; more efficient way to run it than proc summary?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=TeraData.VBM410_ACTIVE_LOAN_BAL(Where=(Agreement_Account_Id not in (0,.)));
var Fund_Actual_Payment_Count;
class Agreement_Account_Id;
output out=VBM410_ACTIVE_LOAN_BAL max=Mis_Tash_Paid;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jul 2023 06:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-row-not-delivered-trget-No-more-spool-space-in-udkdw02/m-p/886352#M350249</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2023-07-26T06:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata row not delivered (trget): No more spool space in udkdw02</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-row-not-delivered-trget-No-more-spool-space-in-udkdw02/m-p/886354#M350251</link>
      <description>&lt;P&gt;This looks like Teradata not having sufficient work space. I'd raise this with your SAS admin or eventually directly with your Teradata DBA.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's possible that changing the readbuff option to a lower value would also allow the SQL to execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a where clause in your Proc Summary code that doesn't exist in your SQL code. We also can't know what code exactly SAS sends to the database for execution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you add below options to your code then you'll get in the SAS log what SAS sends to Teradata for in-database execution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token keyword"&gt;options&lt;/SPAN&gt;&lt;SPAN&gt; sastrace&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;',,,d'&lt;/SPAN&gt;&lt;SPAN&gt; sastraceloc&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;saslog nostsuffix&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 07:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-row-not-delivered-trget-No-more-spool-space-in-udkdw02/m-p/886354#M350251</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-07-26T07:32:42Z</dc:date>
    </item>
  </channel>
</rss>

