1

I am trying to access the SAS table which I made outside of Teradata Passthrough in working space for query run. Now it gives me an error. My question is how to access the table not in teradata inside the passthrough

proc sql;
    connect to teradata (user="&user_id.@LDAP" password="&TERADATA_PASS" server='ABC' 
connection=global database="GTY");
    select * from connection to teradata(
    select * from mm)
;
quit;

mm is not in teradata but made in working directory.

LonelySoul
  • 1,212
  • 5
  • 18
  • 45

1 Answers1

1

You probably can't access that in passthrough directly. You either need to run your query using libname access to the Teradata, or you need to put the information you need into a macro variable or text file that could be included in the passthrough query. In passthrough you can only access what you could access in an interactive Teradata session - so unless you have SAS defined as an ODBC or such provider for Teradata, it's a no go.

Typically what I do in this case is first try to execute the entire process through libname access, and if that fails (either because of execution time or because of a need for passthrough-only elements like stored procedures) then I use libname access to load the table to a table inside the RDBMS (Teradata here). Then it's available in your passthrough session for use (as a native Teradata table).

Joe
  • 62,789
  • 6
  • 49
  • 67
  • I thought the same. Libname just takes an eternity to solve and hence I thought I will go through the Pass Through. However it seems to me rather inconsistent. Since "macro variables" made in working direcory are usable inside the passthrough but "table" are not. – LonelySoul Nov 21 '13 at 22:05
  • 1
    Macro variables are just text pop-ins, so when the passthrough is translated to teradata, it resolves the values of macro variables. Datasets are their own thing; the libname access method is intended to allow you to access them. Simply copying a table via libname access should be no slower than any other method; the only reason libname is slower is when it requires you to download the entire table from teradata prior to doing something (which in the case of uploading a table is of course not relevant). – Joe Nov 21 '13 at 22:07