<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: connect to tera via sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958361#M374054</link>
    <description>&lt;P&gt;So If I open Tera then I can use this violtate table from tera?&lt;/P&gt;
&lt;P&gt;What is the using of such code?&lt;/P&gt;
&lt;P&gt;I am trying to understand how can I use it for my needs?&lt;/P&gt;
&lt;P&gt;Please note that I have both SAS dat sets and tera tables that I need to work with (merge,set, and so on).&lt;/P&gt;
&lt;P&gt;My target is to work VIA SAS platform and using sas data sets and tera tables&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2025 13:29:06 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2025-02-05T13:29:06Z</dc:date>
    <item>
      <title>connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958167#M373992</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Via this code I connect to tera table and create a sas table called&amp;nbsp;&lt;CODE class=" language-sas"&gt;VBM376&lt;/CODE&gt; (must use tera/sql language here)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;  
connect to teradata (server=dwprod  schema=DWP_vall authdomain=TeraDataAuth mode=teradata);
create table VBM376  as 
select * from connection to teradata
(
SELECT   top 5 *
from VBM376_INTERNAL_ORGANIZATION
);
disconnect from teradata;
quit ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I saw in internet the option to run following code.&lt;/P&gt;
&lt;P&gt;I dont see that any sas data set was created here.&lt;/P&gt;
&lt;P&gt;My question - what exactly this code is doing?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it creating a tera table in tera?&lt;/P&gt;
&lt;P&gt;Then can I use this tera table in sas ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
connect to teradata (server=dwprod  schema=DWP_vall authdomain=TeraDataAuth mode=teradata);
 execute(
 create volatile table VBM376_b as (
SELECT   top 5 *
from VBM376_INTERNAL_ORGANIZATION
 )
 with data primary index (Team_IP)
 on commit preserve rows
 ) by teradata;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Feb 2025 07:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958167#M373992</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-02-04T07:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958168#M373993</link>
      <description>You are right.&lt;BR /&gt;When you are using EXECUTE ( ) BY; "nothing" happens in SAS. In this example a temporary table is created in TD.&lt;BR /&gt;If you modify the syntax a bit, you can use it in SAS. See this thread for an example:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-a-Volatile-Table-from-Tereadata-to-SAS-EG-Syntax/td-p/926485" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-a-Volatile-Table-from-Tereadata-to-SAS-EG-Syntax/td-p/926485&lt;/A&gt;</description>
      <pubDate>Tue, 04 Feb 2025 08:05:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958168#M373993</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2025-02-04T08:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958172#M373994</link>
      <description>&lt;P&gt;THANK YOU&lt;/P&gt;
&lt;P&gt;tell please what is the benefit of creating a vilotate table in tera via sas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible then to merge this tera table with other sas daat set?&lt;/P&gt;
&lt;P&gt;Also, I run this code and I dont understand what happens&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname tdwork teradata 
AUTHDOMAIN=TeraDataAuth 
mode=teradata  
server=dwprod
connection=global 
dbmstemp=yes
;
PROC SQL NOERRORSTOP;
CONNECT USING TDWORK as TERADATA;
EXECUTE BY TERADATA 
( create volatile table VBM376_b as
  (
SELECT   top 5 *
from VBM376_INTERNAL_ORGANIZATION
  )
with data primary index(Team_IP) On Commit Preserve Rows 
);
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Feb 2025 08:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958172#M373994</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-02-04T08:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958177#M373996</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;Just copy/paste your code into Copilot and you'll get already a lot of explanation. If after this something still remains unclear ask a more targeted question - eventually on a Teradata forum if it's about the Teradata SQL portion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS you can have session scope tables in WORK. They all get dropped automatically when your SAS session ends. In Teradata volatile tables are also session specific and get dropped automatically once the Teradata session ends. And both in SAS and Teradata these session specific tables are only accessible within the session so you also don't have to worry about security.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's important is&lt;STRONG&gt;&amp;nbsp;connection=global&lt;/STRONG&gt;&amp;nbsp;because it enables that consecutive steps like multiple Proc SQLs can use the same connection/Teradata session and though can all access to the volatile table once created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most common use case for temporary/volatile DB tables is for loading data. You load your SAS data into a temporary DB table and then do all the inserts and updates in-database. And once your session ends there is no need to clean-up (same as with SAS tables in WORK).&amp;nbsp; ...you just need always to read-up how temporary tables really work for the DB you're using. In Oracle for example temporary tables are a bit more permanent. The table definition is permanent, the data attached to the table definition can have session or transaction scope.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 11:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958177#M373996</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-02-04T11:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958361#M374054</link>
      <description>&lt;P&gt;So If I open Tera then I can use this violtate table from tera?&lt;/P&gt;
&lt;P&gt;What is the using of such code?&lt;/P&gt;
&lt;P&gt;I am trying to understand how can I use it for my needs?&lt;/P&gt;
&lt;P&gt;Please note that I have both SAS dat sets and tera tables that I need to work with (merge,set, and so on).&lt;/P&gt;
&lt;P&gt;My target is to work VIA SAS platform and using sas data sets and tera tables&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 13:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958361#M374054</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-02-05T13:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: connect to tera via sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958363#M374055</link>
      <description>Check with a Teradata DBA to guide you on how to use TD tables.&lt;BR /&gt;Not sure what your use case is - what is the purpose of creating volatile tables from SAS, and then access from TD?</description>
      <pubDate>Wed, 05 Feb 2025 13:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-to-tera-via-sas/m-p/958363#M374055</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2025-02-05T13:35:38Z</dc:date>
    </item>
  </channel>
</rss>

