BookmarkSubscribeRSS Feed
milts
Pyrite | Level 9

Hi,

Kinda dumb question to ask but I'm just curious.

Given that I create a sql create table similar to the one below, isn't it that summarization will be done on the teradata database before it is passed to sas?

libname tera_lib teradata server="terasvr" schema="my_schema" user=sasuser password=abc123;

proc sql;

     create table sas_lib.out as

     select a,b,sum(val) as total

     from tera_lib.tera_src

     group by a,b

quit;

But what if I declared a view instead of a table? Will processing still be done in the teradata database everytime I try to access the view?

proc sql;

     create view sas_lib.vw_out as

     select a,b,sum(val) as total

     from tera_lib.tera_src

     group by a,b

quit;

Best Regards,

Milton

2 REPLIES 2
Patrick
Opal | Level 21

I would expect that also the view gets executed on the DB.

But why not just try - eventually using below options to show you in the log what gets sent to the DB.

option sastrace=',,,d' sastraceloc=saslog no$stsuffix;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 665 views
  • 0 likes
  • 3 in conversation