BookmarkSubscribeRSS Feed

How File Location Affects Input File Remapping in SAS Studio Flows

Started 2 weeks ago by
Modified 2 weeks ago by
Views 60

When EGP projects are imported into SAS Studio, import tasks become import nodes in flows. This article explains two ways to reconnect those nodes to their intended source files, with emphasis on using file mapping during EGP import to preserve downstream relationships.

 

Introduction

SAS Enterprise Guide (EG) projects often contain import tasks that use external files such as Excel workbooks, CSV files, and text files.

When these EGP projects are migrated to SAS Studio flows, those import tasks are converted into import nodes. However, to maintain the intended relationship between the original import task and its source file, the file reference must be set appropriately in the target SAS Viya environment.

A common method is to import the EGP project first, open the import node in the flow, select the new input file, and then use Analyze. Another option is to map the input file during the EGP import process.

This article compares these approaches and explains why mapping the input file at import time can be useful when you want to preserve the relationship between the source file, the import node, and downstream nodes.

 

Common Approach: Re-selecting the Input File After Import

In a typical workflow, users first import the EGP project into SAS Studio and then update the generated flow manually.

For import nodes, this often means opening the node, selecting a replacement input file, and running Analyze so that SAS Studio can read the selected file and rebuild the column information.

Blog1.pngBlog1.png

Blog2.pngBlog2.png

 

 

 This approach is straightforward and works well in many cases. However, because Analyze reinterprets the selected file, it may affect how generated variables are represented in the flow.

 

Why Maintaining the Input File Relationship Matters

An import node generates an output table based on the structure of its source file. Downstream nodes may depend on the variables created by that import node.
If the relationship between the migrated import node and its intended input file is not maintained correctly, downstream processing can be affected. This is especially important when the imported data is used by query, join, filter, calculated-column, or transformation nodes.
For this reason, remapping the input file is not only a file-path update. It is also part of preserving the logical structure of the original EG project after migration.

Example: Excel Files with Line Breaks in Column Headers

Consider an Excel workbook that contains column headers with embedded line breaks.

Blog3.pngBlog3.png

In this type of file, selecting a new input file and running Analyze may cause the import node to interpret the variable information differently from the original configuration.
As a result, downstream nodes that refer to those variables may not preserve the same associations as in the original project.
This is a specific example, but it illustrates why maintaining the correct relationship between the import task and the input file is important during migration.

Alternative Approach: Mapping Input Files During EGP Import

For situations where preserving the original relationship is important, mapping the input file during the EGP import process can be a better approach.
During EGP import, you can specify the target file that corresponds to the original source file used by the import task.

By mapping the source file during import, the resulting flow can be created with the intended file reference already associated with the import node.

This can reduce the need to open each import node after migration and run Analyze manually. It can also help minimize the risk of disrupting downstream node relationships.

Mapping Files Stored in SAS Content

If the target source file is stored in SAS Content, select the corresponding file from SAS Content in the mapping step.

Blog4.pngBlog4.png

After import, the generated import node will refer to the file stored in SAS Content.

Mapping Files Stored on a SAS Server

If the target source file is stored on a SAS Server, use Server Files and Folders to select the appropriate file path during mapping.

Blog5.pngBlog5.png

After import, the generated import node will refer to the file on the server file system.

Recommended Migration Workflow

For EGP projects that contain import tasks, the following workflow is recommended:

  1. Prepare the source files that will be used in the target Viya environment.
  2. During EGP import, map the original input files to the intended target files.
  3. Create the SAS Studio flow from the imported project.
  4. Review downstream nodes that depend on the imported data.

Run the flow and validate the results.

Conclusion

When migrating EGP projects to SAS Studio flows, import tasks are converted into import nodes. For projects that rely on external files, maintaining the relationship between those import nodes and their source files is an important migration consideration.
Although you can re-select input files after import and run Analyze, this may not always be the best approach when downstream nodes depend on variables generated by the import node.
Mapping input files during EGP import can help preserve the intended relationship between the original import task, the source file, and downstream processing. This approach is especially useful in cases such as Excel files with line breaks in column headers, where reanalysis may affect variable associations.

Quick Reference

Approach

When to use it

Consideration

Re-select after import and run Analyze

Useful for simple files and straightforward imports

Analyze reinterprets the file and may affect variable associations.

Map input files during EGP import

Useful when preserving the original import task relationship is important

Helps reduce post-import rework and can protect downstream relationships.

 

Contributors
Version history
Last update:
2 weeks ago
Updated by:

Viya Copilot Motion Graphic.gifViya Copilot Motion Graphic

Ready to see what SAS Viya Copilot can do?

Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.

Get Started →

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Labels
Article Tags