The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Read SAS data

yyhuangyyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
edited November 2018 in Knowledge Base

Question

I have a SAS data, can I load it into RapidMiner? I encountered an error when I tried to read in a SAS data set in rapidminer.

Answer

'Read SAS' operator is an advanced data connector in rapidminer. http://docs.rapidminer.com/studio/operators/data_access/files/read/read_sas.html

 

If your process failed for some known parsing issues with 'Read SAS' operator, you can try this workaround solutions uses R to read SAS files and RapidMiner's R connector to easily get a handy data set out of R.

 

In order to apply it you need to:

- download r scripting extension from our marketplace via RapidMiner Studio or directly via this site: https://marketplace.rapidminer.com/UpdateServer/faces/product_details.xhtml?productId=rmx_r_scripting
- install a local copy of R and open RapidMiner Studio preferences which will after a restart hold an additional "R scripting" tab – here enter the local path to RScript.exe of your local R installation
- open R command line and run install.packages("sas7bdat") and install.packages("data.table") to add these libraries to your setup
- now you can open the attached process (SAS Alternate Reader URL)  and configure the operator "Generate Macro" to open any SAS file from a gvien URL

- for testing purposes, you can have access to a list of example sas7bdat files from here:

https://github.com/ppham27/sas_to_csv/tree/master/test_files

- to make the attached process work for your own LOCAL SAS data, simply modify the function expression of the macro 'source' to update the value of source, for instance, set macro 'source' as "C:/Users/HOMEFOLDER/Downloads/YOUROWNDATA.sas7bdat". Refer to the attached process (SAS Alternate Reader Local) to make some modifications accordingly.

 

 

 

 

Comments

  • yyhuangyyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
  • sgenzersgenzer Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    @yyhuang is this the same update that was done Jan 2017? That is the last update shown on that page.

  • yyhuangyyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist

    Hi @sgenzer, we can igonor the original KB since the new SAS connector can load sas7bdat data directly into RapidMiner. Before it came to marketplace around Jan 2017, the old version of SAS connector did not work well. I thought it would be a workaround to use R scripts so published it as a KB. Now the bug is fixed. We have not seen any complaint for the new SAS connector.

Sign In or Register to comment.