BookmarkSubscribeRSS Feed

Go with the flow; migrating Enterprise Guide Projects to SAS Studio Flows

Started ‎05-25-2021 by
Modified ‎05-25-2022 by
Views 12,225

In SAS 9.4 Enterprise Guide (EG) is a very popular tool for a variety of SAS-related tasks. EG is used for data preparation, data analysis, analytics, reporting, and just about any other task you could perform with SAS code. In this article, I will look at how you can migrate your SAS 9.4 EG projects to SAS Viya 4. EG projects are migrated to SAS Studio flows.

 

What is Supported?

The SAS Viya 2020.1.4 stable release is the first release that supporting import of EG projects. At a high level here is what is supported:

  • EG Projects to SAS Studio Flows
  • Projects created in Enterprise Guide 7 and later.

An EG project can contain one or many Process Flows. Each Process Flow is made up of a series of tasks. When an EG project contains multiple Process Flows a Viya folder is created on import, and each flow is migrated to a SAS Studio Flow in the folder. Currently, each EG task is migrated to SAS Studio Flow Code Step.

 

Content Assessment

SAS 9 Content Assessment can help with the migration of EG projects. SAS 9 Profile for SAS Enterprise Guide helps you identify SAS Enterprise Guide projects in your SAS 9 system. The report contains file system organization and time-based usage patterns of  Enterprise Guide projects.

 

gn_eg_promotion_01.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

SAS 9 Code Check for EG Projects helps you understand what code in your EG Projects is a candidate to migrate to SAS Viya. SAS 9 Code Check checks .sas files as well as checks results from the SAS 9 Gather SAS Code application – an application that collects SAS code stored SAS 9 metadata or embedded in Enterprise Guide projects. SAS 9 Code Check for EG Projects enables you to scan your SAS 9 system, review results, and plan for migration by understanding what code is expected to work in your SAS Viya environment.

 

 

gn_eg_promotion_02.png

 

In the report the "Compatible SAS Enterprise Guide Projects" table can be used to export a comma-separated-value file (csv) file that can drive the batch import of the projects identified as compatible. More on that later.

 

Import

EG projects could reside on the filesystem (most common) or in metadata. You can import EG projects from both locations. There are a few options available to import your projects. To import:

  • EG projects stored in metadata first export to a 9.4 package (.spk) file as we do with other SAS 9.4 content and then import to Viya.
  • Individual Projects(.egp file) use the import interface in SAS Environment Manager or the transfer plugin of the sas-viya CLI to import the .egp file
  • Multiple projects (.egp files) use the importEGProjects application delivered with SAS 9 Content Assessment.

Using the importEGProjects application there are two ways to specify which projects to import.

 

Use a folder path

Use --source-location to specify the path to a directory containing SAS Enterprise Guide projects.

 

./importEGProjects.exe --sas-viya-path "D:\\ViyaHome\\CLI\\sas-viya.exe" --source-location "D:\workshop\gelcorp\finance\projects"

 

Use a csv file

Use  --source-file  to specify the fully qualified path to a CSV file containing a list of SAS Enterprise Guide projects to import. The CSV file contains a list of compatible projects, it was created in the planning phase from the EG Code Check report.  

 

./importEGProjects.exe --sas-viya-path "D:\\ViyaHome\\CLI\\sas-viya.exe" --source-file "D:\workshop\94packages\EGPImportList.csv"

 

When importing projects in batch you can choose a root folder for the projects (the default is (SAS Content > ConvertedEGProjects). Under that folder, the full path to the project as it was on the source file system is created in the Viya folder structure. If a project contains multiple Process Flows a folder is created for that project containing a SAS Studio Flow for each process flow.

 

gn_eg_promotion_04.png

 

SAS Studio Flows

In the Content Migration area things are changing quickly. In this first release of EG migration, each "task" in an EG process flow is converted to a SAS Program Step in a SAS Studio flow. The SAS program Step contains SAS code that performs the function of the EG task.

 

gn_eg_promotion_03.png

 

Future development will add support for the migration of tasks to steps with equivalent functionality e.g., query builder task to query step. Check out the Viya Administration guide for more details about specific Enterprise Guide tasks.  Some Enterprise Guide tasks:

  • are not supported because there is no equivalent in Viya e.g., Update Library Metadata.
  • require manual updates of the resulting program step e.g., Create Format from Dataset.

If a task in a flow is not supported, it will be noted in the log and in the Environment Manager UI.

 

Additional Steps

Resources that the EG projects need such as code, data files, and SAS datasets must be accessible to the target Viya environment. Data for EG projects migrated to SAS Studio Flows must be made available to the Viya compute server. To make data available add the libname statement to the startup of SAS Studio compute context. For details on how you can do this see this article on "Modifying Server Startup Configuration in SAS Viya". The Content Assessment reports will have given you details of where the projects are accessing resources on the file system that may be in a different location in SAS Viya.

 

Validation

Another new feature the Enterprise Guide Migration Summary report will help you look at the results of migrating SAS 9 Enterprise Guide Projects to SAS Studio Flows in SAS Viya. Results are available for each node in EG Projects, indicating whether the resulting steps in SAS Studio Flows need attention in any way. The report is delivered with the Content Assessment Applications and the data is retrieved by the transfer cli. Use the transfer plug-in of the SAS Viya cli to generate an Import History CSV File

 

sas-viya transfer import-history --all -f /tmp/importHist.csv

 

Import the CSV file to the SystemData Caslib

 

sas-viya cas tables import csv --server cas-shared-default --caslib SystemData --contains-header-row --scan-rows 99999 --replace --force --table  ImportedItems --source-file /tmp/importHist.csv --su

 

The report is located  at SAS Content > Products > SAS Environment Manager > Dashboard Items > Enterprise Guide Migration Summa. Key information includes:

  • Status of the import of each project
  • Migration status of steps within projects
  • Summary by type of step and importing user

 

gn_eg_promotion_05.png

 

Keep in mind that this is the first release that supports Migration of EG Projects. Content Migration functionality is improving with every stable release. Expect to see additional functionality in the coming months.

 

For additional information:

SAS Demo | SAS Viya Migration of Enterprise Guide Project to SAS Studio Flows

A first look at Migration from SAS 9.4 to SAS Viya

SAS Help Center: SAS 9 Content Assessment

SAS Help Center: SAS Viya: Content Migration from SAS 9.4

SAS Help Center: SAS Studio Working with Flows

 

I would like to thank the following people for their input to this article Christiana Lycan, Gary Mehler, Amy Peters, Brian Johnson and Scott McCauley.  

 

Find more articles from SAS Global Enablement and Learning here.

Comments

Get a look at SAS Studio Analyst and its ability to import SAS Enterprise Guide (EG) projects in the SAS Viya 2020.1.4 Release Talk with @AnnaBrown and @AmyP_sas at the 11:42 mark https://www.youtube.com/watch?v=VK21w16BIOU

 

If the SAS EG projects are from EG6.1 version then how can we migrate those projects to Viya

 

@chandusaladi  - EG 6.1 is quite old. It would be advisable to install EG 8.3 then open your EG 6.1 projects in the latest version and save them. That will automatically update them to 8.3. Then you shouldn't have any problems using the SAS Content Assessment tool to migrate the projects to Viya 4 as described above.

@chandusaladi I would second the approach suggested by @SASKiwi . To use the provided tools to import your projects to SAS Viya you will first need to update them in SAS 9.4 to a supported version (EG 7.1 and later). Hope that helps.

Version history
Last update:
‎05-25-2022 11:09 AM
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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