BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Patrick
Opal | Level 21

Hi experts,

Seeking some guidance. 

 

I'm currently working on a demo which goes as follows:
Assume we've got quite a bit of SAS code running in SAS 9.4 against SAS data set (.sas7bdat).
Build a demo where you show us how to run this SAS code with as little change as possible against data stored in CAS, Hadoop (HDFS & S3) and Redshift using both SAS9.4M5 and SAS Viya 3.3.  ...but try to push processing to where the data resides.


All environments are in a single AWS cloud.

 

What I've done so far:
I've created a piece of code with multiple simple PROC's and data steps, wrapped a macro around it, and then define libnames with the same libref but pointing to the different sources (i.e. libref source pointing to Hadoop HDFS then call macro, libref source pointing to Redshift then call macro).

 

This is all working nicely out of SAS9.4M5 and it works even with almost no code change when pointing to CAS (using a CAS libname).

 

But now comes the real Viya bit (very interesting but lots of novelty in it for me)
If the data resides in Hadoop or Redshift and I want to push processing to where the data resides with a (parent) process under SAS 9.4M5 then is my understanding correct that I still need SAS/Connect to the Viya environment and then execute the code directly in Viya.
I've seen that I could define CAS Libs pointing to Hadoop or Redshift and point a library in SAS9.4 to this CAS lib but as I understand it (not sure) this would pull the data from the source into CAS and my process would then execute against CAS.
Is that correct? Do I need to have my code in an rsubmit block? And if yes how would the library definition need to look like for something like Hadoop/Redshift so that processing can get pushed to the database out of Viya (or just post the link to the relevant docu/blog I've missed so far - best with an example).

 

....and this is not about writing Viya specific code but trying to process SAS9.4 code under Viya with as little change as possible. 

 

Thanks,

Patrick

1 ACCEPTED SOLUTION

Accepted Solutions
AhmedAl_Attar
Rhodochrosite | Level 12

Hi @Patrick

 

If I'm not mistaken, Here are few fundamental things you need to keep in mind.

- Viya/CAS ---> Data resides in Memory, and distributed across multiple nodes

- Hadoop/HDFS ---> Data resides on Disk, and distributed across multiple nodes

- Redshift ---> Data resides on Disk, in a Columnar format 

 

Any time, you use SAS Viya/CAS, your data has to be loaded into Memory first (CAS) before it can be processed!

- Introduction to SAS/ACCESS Interface to Hadoop

- Introduction to SAS/ACCESS Interface to Amazon Redshift

 

So while you can demonstrate the ability to Push processing down to the database using SAS 9.x Mz, It will not apply to SAS Viya.

Viya processes data in Memory, if you want utilize the features of the CAS, otherwise your can use the features of the Workspace server within Viya, which is not much different than your SAS 9.4

 

That's just my take, maybe someone else can you give better/alternative perspective.

Ahmed

View solution in original post

2 REPLIES 2
AhmedAl_Attar
Rhodochrosite | Level 12

Hi @Patrick

 

If I'm not mistaken, Here are few fundamental things you need to keep in mind.

- Viya/CAS ---> Data resides in Memory, and distributed across multiple nodes

- Hadoop/HDFS ---> Data resides on Disk, and distributed across multiple nodes

- Redshift ---> Data resides on Disk, in a Columnar format 

 

Any time, you use SAS Viya/CAS, your data has to be loaded into Memory first (CAS) before it can be processed!

- Introduction to SAS/ACCESS Interface to Hadoop

- Introduction to SAS/ACCESS Interface to Amazon Redshift

 

So while you can demonstrate the ability to Push processing down to the database using SAS 9.x Mz, It will not apply to SAS Viya.

Viya processes data in Memory, if you want utilize the features of the CAS, otherwise your can use the features of the Workspace server within Viya, which is not much different than your SAS 9.4

 

That's just my take, maybe someone else can you give better/alternative perspective.

Ahmed

Patrick
Opal | Level 21

@AhmedAl_Attar

Thank you for your explanations - and sorry for replying so late. 

I've got things working in the end and learned a lot on the way. Your answer certainly helped me to take some of the steps quicker.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 1658 views
  • 0 likes
  • 2 in conversation