BookmarkSubscribeRSS Feed

How to back up SAS Enterprise Miner projects without data sets

Started ‎10-12-2017 by
Modified ‎10-12-2017 by
Views 4,749

Question

How do you back up SAS Enterprise Miner projects/diagrams without data sets? Currently I manually save diagrams as xml files or create .spk files.

Answer

Contributed by David Ogden, SAS Sr. Manager, Analytical Consulting, and Dominique Latour, SAS Distinguished Research Statistician Developer

 

For flows that are “large”…or have lots of metadata…I’ve experienced an overflow issue when exporting as xml. 

There is a more robust way to back-up a flow, while also not backing-up any of the data created by the EM project:  saving your flow as a batch program.

Here are the steps:

  1. From inside SAS Enterprise Miner, ensure that all nodes terminate in a single node.  You can use a Control Point node to accomplish this.
  2. Right-click on the terminal node (e.g. the Control Point node), and select to “Export Path as SAS Program.”
  3. Deselect both options that are given; navigate to the location where you want to save the batch SAS Program, and name the program.  For example, flow123_backup.sas.


This large SAS program, if executed, would recreate all the folders, subfolders, and metadata necessary to restore the diagram.


Before executing this program, to restore the project, there are a couple of places that you need to modify this batch program:

%let EM_PROJECT =;   
<-- set this to the path where you want the project to get restored to.  (by default it goes in WORK)

%let EM_PROJECTNAME =; 
<-- set this to the name of the project (by default it’s EmProject)



So, if you wanted the restored project to be in a folder called “flow123” and to be located in the UNIX directory of /gpfs/sasdata/, you would have to modify 2 lines of code found in the flow123_backup.sas batch program as:

%let EM_PROJECT=/gpfs/sasdata;

%let PROJECTNAME=flow123;


Not only is none of the data created by the EM flow restored…but neither is the input dataset.  So, after you open this restored project, you’d need to point to the modeling data source, drop it in the project, and re-run the flow.

 

Comments

What do you mean by "open this restored project, you’d need to point to the modeling data source, drop it in the project, and re-run the flow"?

I did all the steps descriped above and now I have a folder called "EmProject" with several subfolders like "Workspaces", "System", "DataSources"....

Where excalty shall we point to the modeling data source?

 

And is there also a project file that I could use to restore the diagrams in the Enterprise Miner?

 

@JKarp_11, hi.  It sounds like you are able to navigate to see the folder that was created for your EM Project, and it's named EMProject.  This is good.  For the post, I was mainly just describing the process for how to create this...so that you'd have a project backed-up.  If all you wanted to do was back it up, you're done.  But if you want to now open that project and use it again...i.e. restore it, then here's what you'd do:

Open Enterprise Miner.

Select to Open a project.

Navigate to where that EMProject folder is.  Once you navigate to that, select that folder as the project you want to open.

Now cross your fingers that the project opens.  And you are able to see your diagram within that project.  If so...

You'll need to create a new datasource.  It's important that you create a datasource that has the same variable names and type of content as the data your originally used as your input to the project that you backed-up.

Within the diagram, delete the data input node, and then drag and drop the datasource you just created onto your diagram...to replace the node you just deleted.  Connect your datasource into your flow.  Now run your flow.

I hope this helps.

Good luck!

-David 

@Ogden: Many thanks for your help! I guess my problem is related to the fact that I cannot see/access the created EMProject (which is stored in SAS Server List) from the enterprise miner interface due to access rights problems. I have to get in contact with our admin.

Version history
Last update:
‎10-12-2017 03:45 PM
Updated by:
Contributors

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags