2
votes

For normal SAS software, one can use the Python package SASPy inorder to connect to a SAS server, retrieve data and manipulate the data with Python code. However, this package does not seem to work for SAS EG. Does anyone know how to import data from SAS EG servers in a Python IDE?

For example:

SAS EG Server name: Server1
Table name: Table1

What code would you run in a Python IDE to print that table from SAS EG

1
Enterprise Guide is not a server. It is client software that runs on Windows only. Are you instead trying to connect to a SAS server? You should be able to teach saspy how to connect to the same SAS server that your Enterprise Guide sessions are using.Tom
@Tom yes exactly, I'm using SAS EG and I have several SAS Servers. I would like to connect Python to those but am struggling to find resources online of how to make this work for SAS EGFinDev
The instructions should explain how to connect to a SAS server. Enterprise Guide has nothing to do with it (other than proof that the servers exist and you can connect to them.) Just ask your local SAS support for the information needed to connect to the servers. SAS support can help also.Tom
EG is irrelevant here as Tom indicates. You want to connect to the DB so as for the DB info or find out where those live and then connect to them.Reeza

1 Answers

2
votes

This hyperlinked document was very helpful in allowing me to figure this out. It required two files. One cfg file to host the server info. And another file to create a SASsession that referenced the cfg file. For the Windows IOM server I used the code below:

https://sassoftware.github.io/saspy/install.html#choosing-an-access-method

# Windows client and Windows IOM server
winiomwin   = {'java'      : 'java',
               'iomhost'   : 'windows.iom.host',
               'iomport'   : 8591,
               'encoding'  : 'windows-1252',
              }