In Teradata 14.0 or later, when you try to score a model via a User Defined Function (UDF), you might encounter an error similar to the following:
This problem occurs because the Teradata optimizer takes the data and moves it to one Access Module Processor (AMP) when running a UDF that is defined as NOT DETERMINISTIC. The spool space available on that one AMP might not be enough for the data, thus resulting in the error.
A possible workaround is to create the UDF as DETERMINISTIC instead of NOT DETERMINISTIC. To make this change, follow these steps: