DATA Step, Macro, Functions and more

Loading SAS data set to a Teradata Volatile Temporary Table

Reply
N/A
Posts: 1

Loading SAS data set to a Teradata Volatile Temporary Table

I am trying to load a simple SAS file with about 200 observations on it to Teradata, so I can use these as limiting criteria on a query. I don't have the ability to create tables in teradata, so the only option is to load the overstrains to a volatile table and then use that in my query.

The only help I am getting through local channels is to not use SAS and use Teradata SQL assistant. I am a big fan of SAS, and I think it should be able to support this functionality, but everything I have tried has ended in failure. Has anyone been able to do this?
Super User
Posts: 5,434

Re: Loading SAS data set to a Teradata Volatile Temporary Table

Posted in reply to mrsamtime
Maybe you don't have do load a Teradata table. take a look at the DBKEY= option.
http://support.sas.com/documentation/cdl/en/acreldb/61890/HTML/default/a002253008.htm

/Linus
Data never sleeps
Valued Guide
Posts: 2,177

Re: Loading SAS data set to a Teradata Volatile Temporary Table

Posted in reply to mrsamtime
through the odbc access I was able to pass an "in-list" to support a teradata query.
You might have luck with a similar approach. It turns data into syntax, but it worked for me.

good uck
PeterC Message was edited by: Peter.C
Occasional Contributor
Posts: 14

Re: Loading SAS data set to a Teradata Volatile Temporary Table

Posted in reply to mrsamtime
libname x teradata user=&userid password=&passwd server=myTeradataServer connection=global;

/* Create a volatile table */
option debug=dbms_timers
sastrace=',,,d'
sastraceloc=saslog no$stsuffix;

proc sql;
connect to teradata(user=&userid password=&passwd server=myTeradataServer
connection=global bulkload=yes);
execute
(CREATE VOLATILE TABLE temp1 (var1 varchar(15)) ON COMMIT PRESERVE ROWS ) by
teradata; execute ( COMMIT WORK ) by teradata; INSERT INTO x.temp1
SELECT * FROM mysasdataset.var1;

quit;


/* Connect to the volatile table through the global connect.*/
rsubmit;
option debug=dbms_timers
sastrace=',,,d'
sastraceloc=saslog no$stsuffix;

proc sql;
connect to teradata (user=&userid password=&passwd server=myTeradataServer
connection=global);
select * from connection to teradata
( select b.* from a, b
where xxxxxx);
quit;



/* Volatile table is automatically dropped */

libname x clear ;
Ask a Question
Discussion stats
  • 3 replies
  • 2756 views
  • 1 like
  • 4 in conversation