BookmarkSubscribeRSS Feed

SAS Viya 2021.2 – Migrating SAS Data Integration (DI) Studio Jobs to SAS Studio Flows

Started ‎11-15-2021 by
Modified ‎11-15-2021 by
Views 9,950

The SAS Viya 2021.2 (November 2021) Long Term Support (LTS) release provides a means for SAS Data Integration (DI) Studio users to migrate their jobs to SAS Viya by creating SAS Studio Flows.

 

Currently, the code in SAS DI Studio jobs is converted to SAS Program nodes in SAS Studio Flows.  In future releases the code will be mapped to specific SAS Studio Flow nodes where appropriate such as Query, Filter Rows and Sort as is done now for SAS Enterprise Guide (EG) projects.

 

There is a content assessment to help support you SAS Viya content migration.  Refer to this article for more information.

   

Migrate SAS Data Integration (DI) Jobs

This is the DI Studio job I want to migrate to SAS Viya.

 

 

1_DIStudio.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.

 

The first step is to create an export package based on this job.

 

2_DIStudio.png

 

When creating the export package, select the option to Include dependent objects when retrieving initial collection of objects.

 

3_DIStudio.png

 

Once the export package is created, you may need to copy or FTP it to a location accessible by your SAS Viya installation.  In SAS Viya, access the Import page in SAS Environment Manager.

 

4_DIStudio.png

 

Select  1_icon_file.png to navigate to the SAS package file.  Select to import only the DI Studio job(s).  The library and tables won't import and there will be errors.

 

5_DIStudio.png

 

On the Mapping tab, select  1_icon_file.png to navigate to the location to save the converted SAS Studio Flow file(s).

 

6_DIStudio.png

 

Note:  There is no need to map the tables since they are not being imported.  

 

Select the Preview tab to confirm the contents to be imported, then select Import.

 

7_DIStudio.png

 

Confirm the import completed on the Results tab.

 

8_DIStudio.png

 

Now, the resulting flow file(s) can be opened in SAS Studio.

 

9_DIStudio.png

 

When you first open the flow, there is a message that "The flow contains migration errors".  If you hover over the error indicator on the Job pre-code node, the error is displayed.

 

10_DIStudio.png

 

In my case, the migration error is that the library difttgt is required for this job to run successfully.  All the code from the DI Studio job has been converted to SAS Program nodes and a Job pre-code and Job post-code nodes are created and put into swimlanes in the appropriate execution order.   In future releases, code will be converted to more specific nodes instead of just the SAS Program as has already started happening for EG Project migrations.  

 

Also, be aware that the SAS Program nodes use hard-coded table names.  It is a copy of the code from the DI Studio job; therefore, it does not use the macro variables that represent the tables connected on the input/output port of the SAS Program node.  You may want to take advantage of this feature in SAS Studio Flows.  If so, for more information refer to the Using Macro Variables to Reference Input and Output Ports topic in the documentation.  

 

To clear the error message, I can uncomment the LIBNAME statement in the Splitter node of my flow and correct it to fit my Viya installation.  In my case, I would need to adjust the path for the SAS Data Sets in the flow.

 

11_DIStudio.png

 

Another way to clear the error message is to create the SAS Library on the Libraries tab of SAS Studio.  This is the option I am going to do.  Since the library I need to create is for BASE SAS, I need to confirm on the Explorer tab, the location on the SAS Server where the data sets reside.  Note:  You may need to upload or migrate your data to be accessible to your Viya installation.

 

12_DIStudio.png

 

On the Libraries tab, I create the SAS library pointing to the location.

 

13_DIStudio.png

 

I can now close the error message and click the Job pre-code node to make the error indicator disappear.  I save and run the job.  The Job pre-code node completes successfully, but there is an error on the Splitter node.

 

14_DIStudio.png

 

I review the Log and find out the error is due to a missing format for ORDER_TYPE.

 

15_DIStudio.png

 

To clear this error, I can import my custom formats into my SAS Viya installation.  Refer to this article on how to do this.  Another option is to add the format into the code of my flow.  I am going to do that and add the proc format statement using a SAS Program node that I connect to the Job pre-code node.

 

16_DIStudio.png

 

I save and re-run the flow.  This time it completes successfully.

 

17_DIStudio.png

 

I navigate to the DIFTTGT SAS Library and confirm my output tables were created.

 

18_DIStudio.png 

I have now confirmed that I successfully migrated my DI Studio job!    

 

Summary

Users of SAS DI Studio can now begin migrating to SAS Studio in SAS Viya.  The jobs are converted to SAS Studio Flows, but keep in mind you also need to migrate any needed source data, create libraries, and migrate custom formats as well as any other supporting items for the job.  

 

For more information review the topic Transitioning to SAS Studio in SAS Viya in the documentation. 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎11-15-2021 02:53 PM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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