ArcGIS Pro

A SAS to Table conversion tool success story

I successfully used the SAS to Table conversion tool for a recent project. From the original multi-sheet Excel dataset I was working with, I created three tables in SAS: one for the nation, one for states, and one for metro areas. After doing the tabular data transformation, I was ready to read these three tables into ArcGIS Pro and join to boundaries.

The SAS to Table conversion tool preserved my field lengths, field types, and field labels I set in my SAS tables, all things that need to be re-applied when exporting and importing a CSV file. This blog post offers tips to help you be successful when using the SAS®-ArcGIS Bridge, the collective name for a suite of geoprocessing tools and Python libraries that allow you to transfer data between ArcGIS and SAS, bring SAS analytics into ArcGIS, and bring spatial data analysis into SAS.

 

SAS to Table

Once my tables were ready to be read in to Pro, I searched for the SAS to Table tool in the Geoprocessing Pane. I input the library reference and the name of my table in SAS (in my case, “Sasuser.State”), and the name I’d like my table to have once it’s read into Pro (“State”).

SAS to Table geoprocessing tool's dialog box.

My desired field types, lengths, and aliases all come through! For example, my field called State_abbrev is a text field of length 2. The aliases on my numeric fields came from my field labels that I applied in SAS.

My resulting state table in Pro which contains descriptive field aliases.

Similarly, for my table for metro areas, the names of the metros are not truncated because ArcGIS Pro honors the length of this text field that I set in SAS.

Table in Pro will full metro names visible.

The Opposite: Table to SAS

Do you have a resulting attribute table from some geoprocessing steps that you now want to use in SAS? There’s a conversion tool for this workflow as well: Table to SAS. With this tool, you have the option to replace a SAS dataset with the same name (the equivalent of the replace statement option in the import procedure).

Table to SAS conversion tool dialog box. One of the check boxes says "Replace SAS Dataset."

These two conversion tools can be used in the graphic user interface in ArcGIS Pro (as shown), and also in scripts that utilize ArcPy. These tools allow you work with SAS on your desktop (as I have done here), or using SAS Cloud Analytical Services (CAS).

The frustrating days of exporting and importing CSVs between SAS and ArcGIS are no longer. The SAS®-ArcGIS Bridge enables you to work seamlessly between ArcGIS and SAS, combining two of the most powerful data analysis technologies into a single environment!

Troubleshooting Tips

If these tools are not working as expected, here are some things to try:

Note: the above steps were performed using ArcGIS Pro 2.8.3 and Base SAS 9.4 M5.

About the author

Diana loves working with data! She has over a decade of experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior product engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.

0 Comments
Inline Feedbacks
View all comments

Next Article

What’s New in ArcGIS Workflow Manager 10.9.1

Read this article