I want to access volatile teradata table in SAS. I am able to create the volatile table using the following code :
proc sql;
connect to teradata (user="youruserid" password="yourpassword" mode=teradata server="servername" connection=global);
execute(
create volatile table temp as (
select id
, region
, sector
, income
from ls_policy_inter
group by 1,2
)
with data primary index (id)
on commit preserve rows
) by teradata;
quit;
So if i need to use the table created in the above code in the subsequent code. I can access only permanent teradata table.
Before you create your volatile table first create a libref using the same connection details, including the CONNECTION=GLOBAL setting, and include the DBMSTEMP=YES option.
libname tdwork teradata user="youruserid" password="yourpassword"
mode=teradata server="servername"
connection=global dbmstemp=yes
;
Then from SAS you can view the volatile table your SQL code generated as TDWORK.TEMP. You will also be able to see the tables from future PROC SQL steps (that use the same connection details).
Leave that libref active for as long as you want to be able to view your volatile tables.
This post might point you in the right direction:
Before you create your volatile table first create a libref using the same connection details, including the CONNECTION=GLOBAL setting, and include the DBMSTEMP=YES option.
libname tdwork teradata user="youruserid" password="yourpassword"
mode=teradata server="servername"
connection=global dbmstemp=yes
;
Then from SAS you can view the volatile table your SQL code generated as TDWORK.TEMP. You will also be able to see the tables from future PROC SQL steps (that use the same connection details).
Leave that libref active for as long as you want to be able to view your volatile tables.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.