10-12-2017 04:26 AM
In what sense do you mean "connect"? For instance, you could just want to run programs in batch which is a simple command line call, or maybe you want to access data which may need a driver or specific software. Give as much detail about what your doing/expect as possible.
10-12-2017 04:28 AM
please give a look to this great post published by @ChrisHemedinger : https://blogs.sas.com/content/sasdummy/2017/04/08/python-to-sas-saspy/
It is about SASPy, the tool you can use to connect from Python to SAS.
10-12-2017 07:55 AM
To expand on what @JuanS_OCS suggested:
SAS provides an open-source library called SASPy that allows you to connect your Python console or Jupyter Notebook to SAS. You can find the library on the sassoftware GitHub account. It works with SAS on any OS: Windows, Unix/Linux, even z/OS.
SASPy brings a "Python-ic" sensibility to this approach for using SAS. That means that all of your access to SAS data and methods are surfaced using objects and syntax that are familiar to Python users. This includes the ability to exchange data via pandas, the ubiquitous Python data analysis framework. And even the native SAS objects are accessed in a very "pandas-like" way.
import saspy import pandas as pd sas = saspy.SASsession(cfgname='winlocal') cars = sas.sasdata("CARS","SASHELP") cars.describe()
More details, including a video with a demo, in this article: Introducing SASPy: Use Python code to access SAS.
11-15-2017 07:57 AM
Thanks @ChrisHemedinger for you reply.
I'm working on a presentation about Jupyter notebook and SAS and how it works(for dummies :-)). I need to create a demonstarion of connection between SAS servers, jupyter notebook, saspy,... that how they communicate in a simple way. Is there such document or link that can be used for this purpose?
11-15-2017 08:26 AM
11-15-2017 08:44 AM
@Riana I am not sure if this answers your question but I have once made a simplified illustration on how Jupyter works for a presentation I gave.
The link between the Notebook Server node and the Notebook File node links to JSON