Page tree

Back to Knowledge Base

How to Save Data from SAS Content to Workbench

As a best practice, store SAS Code or models within the user folder in SAS Contents. Avoid storing large data sets or external file types ( i.e., PDF files, Excel, CSV, Text). However, if those type of files are already within the user's SAS Content (Organization or Personal), they will need to move it to either the Workbench or Hive Project Database.

Step-by-step guide

Use the following steps to save data from SAS Content to Workbench.

1) Start a new SAS Viya session.

2) Create a new program with the following code.

filename pgm filesrvc folderpath = "/Projects/Helpdesk" filename = "";
%include pgm;

3) To insert the right folder paths, navigate to the SAS Contents folder that contains the relevant SAS Program(s).

4) Right-click and click on Insert as Path.

5) Put a comma after the path and navigate to the destination folder in S3 (workbench). Click Insert as Path and close with a slash "/". 

Note: Users that want to create a new path need to type the workbench path in their workbench project folder. Make sure that destination path is always closed with a slash ("/")

The result should look like this:

filename pgm filesrvc folderpath = "/Projects/Helpdesk" filename = "";
%include pgm;

6) Select the code and click RUN.

Compare the contents of the origin and destination folders and let the CCSQ Data & Analytics Team know if there are any differences. 

  • No labels