I have been loading SAS datasets to tables in Teradata using fastload (an example of code is below) and yesterday I tried to load a table but it gave me an error that I ran out of space. I deleted a big table and tried again and I keep getting an error that says:
"ERROR: Fastload failed the end loading statement: Operation not allowed: [Table Name] is being Loaded."
Where I put [Table Name] it is a table name that isn't exactly the table I am trying to load. Let's say my table name is ThisIsMyTableName, in the error message it is saying ThisIsMyTableNa_SE2_1831116450 is being loaded.
I am guessing when I tried to load the data the first time it created some temporary tables and now it is stuck trying to load those? Any ideas on how I can fix this issue and load the data? Below is an example of the datastep code I am using to load the data:
data MyDB.ThisIsMyTableName (FASTLOAD=YES TPT=YES DBCOMMIT=0);
set work.ThisIsMyTableName;
run;
Issue ended up being Teradata was using the first column in my dataset as the primary index and it was not a field that should be used as such. Changed the order of the columns and it worked fine.
Issue ended up being Teradata was using the first column in my dataset as the primary index and it was not a field that should be used as such. Changed the order of the columns and it worked fine.
you need not change the order of columns. All you need to do is to use option dbcreate_table_opts as shown below
data tdtable.employee_scoring (dbcreate_table_opts= 'primary index(employee_number)');
set work.employee_scoring(keep= Job_type employee_number Sal, Sal_rating);
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.