Learning SAS? Welcome to the exclusive online community for all SAS learners.

Three Simple Ways to Import Data Into SAS OnDemand for Academics: Enterprise Miner

Reply
SAS Employee
Posts: 29

Three Simple Ways to Import Data Into SAS OnDemand for Academics: Enterprise Miner

[ Edited ]

Good Afternoon!

 

I have noticed that SAS OnDemand for Academics users sometimes have trouble importing their own data into SAS OnDemand for Academics: Enterprise Miner. 

 

In this list, I will explain three simple methods you can use to import data into SAS OnDemand for Academics: Enterprise Miner:

 

Method 1:

  • Create a new folder in SAS OnDemand for Academics: SAS Studio 
  • Upload your data to the new folder that you created
  • Right click on the new folder and click Create-->Library.
  • Copy the Path of the new Library in SAS Studio
  • In SAS OnDemand for Academics: Enterprise Miner, write a libname statement for the start-up code using the path of the new library you created in SAS OnDemand for Academics: SAS Studio. 

 

 

See the following PDF for more details:

 

 https://support.sas.com/ondemand/manuals/UploadingDataUsers.pdf

 

Method 2:

 

  • Get the Path of the folder that contains your datasets in SAS OnDemand for Academics: SAS Studio. To see the path, simply right click on the folder and click properties (See screenshot below):

3.png

 

  • Open up SAS OnDemand for Academics: Enterprise Miner and start a new project. In the Project Start-up code, type the following:

 

 

 /*the text after 'path=' should be the path in the screenshot above, pointing to the folder containing your datasets*/

%let path=/home/danielduval0/EMFiles; 

libname example "&path"; 

run;

You can also reference the folder a similar but easier way, as someone pointed out in the comments:

 

 

/*users of SAS OnDemand for Academics can use '~' instead of '/home/<userid>', as  '~' is automatically expanded to the correct path for their home directory.*/

%let path=~/EMFiles; 

libname example "&path"; 

run;

 

  • Run the Project Start-up code. You should now see in SAS OnDemand for Academics: Enterprise Miner's Explorer window that you have now created a new library, called "Example" (see screenshot):

4.png

 

Method 3:

  • In SAS OnDemand for Academics: SAS Studio, the folder called "sasuser.v94" is actually a permanent library called "sasuser" in SAS OnDemand for Academics: Enterprise Miner. You can simply upload your files to the sasuser.v94 folder and they will show up in the permanent sasuser Library (no start-up code necessary!).

 

  • As you can see in the screenshot below, I have already uploaded a few datasets to the sasuser.v94 folder. Without using any start-up code, I will be able to see all of the .sas7bdat files in (.csv files and .xlsx files need to be converted to the .sas7bdat format first)

5.png

6.png

 

 

 

There are definitely more ways to import data into SAS OnDemand for Academics: Enterprise Miner that I did not mention here, but I have found these methods to be the easiest. 

 

Please let me know if you have any questions related to any of these methods! 

 

Daniel DuVal

SAS Employee
Posts: 29

Re: Three Simple Ways to Import Data Into SAS OnDemand for Academics: Enterprise Miner

Posted in reply to danielduval0

If you are still confused about how to import data into SAS OnDemand for Academics: Enterprise Miner, see the following Two-Minute Solution video:

 

https://communities.sas.com/t5/SAS-Analytics-U/Two-minute-Solutions-Using-your-own-data-with-SAS-Ent...

 

 

SAS Employee
Posts: 21

Re: Three Simple Ways to Import Data Into SAS OnDemand for Academics: Enterprise Miner

Posted in reply to danielduval0

As a Best Practice, users of SAS OnDemand for Academics should use '~' instead of '/home/<userid>'.  '~' is automatically expanded to the correct path for their home directory.

 

=G=

SAS Employee
Posts: 29

Re: Three Simple Ways to Import Data Into SAS OnDemand for Academics: Enterprise Miner

I was not aware of this trick! I guess you learn something new everyday Smiley Happy I will update the code in my post.

Ask a Question
Discussion stats
  • 3 replies
  • 507 views
  • 2 likes
  • 2 in conversation