Questions tagged [saspy]

Questions regarding the saspy Python module

saspy Python module is available on GitHub at https://github.com/sassoftware/saspy

21 questions
2
votes
0 answers

SASPy Remote Server Connection

I'm trying to connect to my company remote SAS Server, looking into my user profile in SAS Enterprise Guide, i can get the machine name and the port, i'm inserting correctly the informations, then also typing correctly the login and password, but it…
2
votes
1 answer

SASpy file_delete Method

Does anyone has used the file_delete() method of SASpy? I'm trying to delete a file in SAS Server side using this method but I was unable to make it works. sas.file_delete(filepath='/au/gac/public/data', fileref='myfile', quiet = False) I got:…
Marcio Lino
  • 379
  • 2
  • 15
2
votes
2 answers

saspy: write large SAS table to local csv

The SASData object has to_csv and to_df_CSV methods, but both of these write to locations on the host machine (where the SAS session is running). Is there a way to write a large SAS data table to .CSV on my local machine from a remote connection?…
kingfischer
  • 408
  • 2
  • 13
2
votes
2 answers

Execute SAS Stored Process with Python

I know there is a method where you can call a stored process via the SAS Stored Process Web Application, but I was wondering if there is a method where i can call the stored process server directly. The goal is to call a stored process which…
submit
  • 53
  • 2
1
vote
1 answer

Cannot connect SAS OnDemand for Academic - SASpy

I follow the site: enter link description here My sascfg_personal.py SAS_config_names=['oda'] oda = {'java' : 'C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe', #US Home Region 1 'iomhost' :…
PTQuoc
  • 938
  • 4
  • 13
1
vote
1 answer

allocate libname saspy python SASmagic command

While using SaSPy, how can I find where the library RWORK is located ? I tried sas.dirlist() but without being able to find anything. It might be due to remote access? Below is my setup connexion import saspy import pandas as pd import…
A2N15
  • 595
  • 4
  • 20
1
vote
2 answers

How to specify LIBREF in SASPy when turning a SAS table into a Python Dataframe

Please see the image below for my SAS Server Layout. I would like to pull the top table 2020_01_SETTLEMENTS and place it into a Python data frame. I have successfully established connection between Python and the SAS Server. I have the following…
FinDev
  • 429
  • 5
  • 16
1
vote
1 answer

Running SAS code through Python to login to a specific SAS-database

I need to login to a SAS-database through Python, to get access to the SASdata project folders and pull data. I am using updated packages per 01/20/2020, testing via saspy and Jupyter Notebook on Windows 10. The way I do it at the moment is to pass…
mmhj
  • 121
  • 1
  • 10
0
votes
0 answers

Python connection class - Checking if connection is alive

I am constructing a class where I will encapsulate the saspy lib. What I want to develop now is a method to check if the SAS connection still alive, so, if not, I call it to reconnect. I am looking for a magic method that is executed every time my…
FábioRB
  • 335
  • 1
  • 12
0
votes
0 answers

Configurating SASPY without configuration file

Currently I use saspy on my local machine without any issues. I´ve created an file on my workspace called "ConexaoSAS.py", which contain saspy configuration details, and by importing such file to other notebooks I am able to access my sas…
FábioRB
  • 335
  • 1
  • 12
0
votes
1 answer

How to filter date column data from sas with saspy (Python)?

I want to filter date column for a table data = sas.sasdata("METEOGROUP", "ABC", "PANDAS", { "where": "DATE_DAY>'2021-04-20'" } ).to_df() But there is no result…
Sevval Kahraman
  • 1,185
  • 3
  • 10
  • 37
0
votes
1 answer

how to filter / query data from Python SASPY to_df function

I am working on python on some data get from a SAS server. I am currently using SASPY to_df() function to bring it from SAS to local pandas. I would like to know if its possible to filter/query the data that is being transferred so I could avoid…
FábioRB
  • 335
  • 1
  • 12
0
votes
2 answers

Not able to do pip install saspy

I am using jupyter notebook and tried to run pip install saspy and i am getting the following error. ERROR: Could not find a version that satisfies the requirement saspy ERROR: No matching distribution found for saspy Note: I have the python version…
nikky
  • 15
  • 1
  • 5
0
votes
0 answers

Open multiple SAS windows for multiple programs

I have 3 sas program like:- a.sas, b.sas, c.sas So if I click on a.sas, a sas session/window will open, then if I click on b.sas, a different sas session/window should open and if I click on c.sas again, then a third sas session/window should…
0
votes
0 answers

saspy - establishing iomcom connection

I am trying to setup a connection to remote SAS server using IOMCOM. I've configured sascfg_personal.py file with iomhost iomport class_id and encoding. Then when I import saspy and try to run this code: saspy.SASsession(results="TEXT") Next it…
Carlito
  • 81
  • 8
1
2