BookmarkSubscribeRSS Feed
AmitSri
Pyrite | Level 9

Hi,

 

I wanted to integrate python with SAS Studio. If you have any idea on this, could you please share.

 

Thanks!!

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

https://blogs.sas.com/content/sasdummy/2017/04/08/python-to-sas-saspy/

 

What I would say is be careful when using more than one technology.  You may create a whole wonderful program coded in python, but when it goes to production, those who don't know python will not want your code.  There are valid reasons to use python for some reasons (extermely long numbers for instance, or user interfaces), but don't use another technology just for the sake of it.

AmitSri
Pyrite | Level 9
Thanks for the reply. Our project is mainly involved with python integration, as our cleint will be using python coding.
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Define "integration".  Could mean any number of things.  For instance if you just need to read SAS datasets there appears to be a package for it:

https://pypi.python.org/pypi/sas7bdat

 

No need for studio.  If however you intend to use SAS for analysis and such like, then you would first need a license, then you would have a server setup with SAS installed on it and use stored processes (or have a web front end for reports and such like).  Its quite hard to say without any information.

sastpw
SAS Employee

@AmitSri.

I see this post is about a year old, but I've only gotten on to this Communities site and have started looking at various posts.

Thought I would mention something that might be what you're looking for. Though, as others has mentioned, it kind of depends on what you're really looking to do.

Studio doesn't let you write python code or drive it from python code. But there is a python module that connect to SAS 9.4 called saspy:

https://github.com/sassoftware/saspy

There is also a python module that allows you to connect to CAS (the SAS server in Viya):

https://github.com/sassoftware/python-swat

 

Each of these are python interfaces, so you are writting python code to interact with SAS. These work with Jupyter notebooks, which are in interactive web based UI, like Studio, but not specific in any way to SAS, just a popular open source Notebook interface.

 

You may have already seen this since this was posted, but I thought I'd share incase anyone else happened to look at this port for an answer!

 

Thanks,

Tom

Reeza
Super User

Are you on SAS Viya?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 3059 views
  • 3 likes
  • 4 in conversation