BookmarkSubscribeRSS Feed

It was the Delimited File in the Autoload Library with a Pipe

Started ‎06-12-2017 by
Modified ‎06-12-2017 by
Views 1,659

My apologies to fellow Clue fans out there for the lame title but it describes perfectly a recent exchange I had with a long-time friend.  My friend was working with a customer who receives data in the form of pipe-delimited ('|') values and when they dropped these files into their autoload directory, VA did not import them as expected. With a little sleuthing, we found an easy LASR library configuration change that allowed us to specify the delimiter to use when loading his data and all was well.

 

01_DLMSingleVar.jpg

For testing purposes, we created a pipe delimited version of the infamous SASHELP.CLASS data set, named it PIPE.TXT, and dropped it into our autoload directory. When we examined the SAS data set that resulted from the autoload import, it was clear that the pipe character was not being recognized as a delimiter for we saw our data set had but one character variable that contained each line of data of our file as a single value.

 

We reviewed the autoload log, found where the file was being imported, and saw that the step expected the file to be TAB delimited.

04_DLMLog.jpg

A little more digging uncovered that when deciding what to do with external files dropped into the autoload directory, great importance is given to the file name extension. The processing code checks for some obvious values and assumes the following:

05_DLM.jpg

 

Clearly VA was using TAB as the default delimiter so we went looking for a place we could set that to use a pipe character instead of a TAB.

It turns out that there is an extended attribute on the LASR library associated with each autoload location that allows the administrator to specify the default delimiter. The attribute is VA.AutoLoad.Import.Delimiter.TXT and as the name implies, it determines which delimiter to assume for a .TXT file processed during autoload. The default setting was TAB so we simply edited the value to use a pipe as shown below and saved our setting.

02_DLMPipe.jpg

 

We deleted the metadata and files from our first run and the next time autoload executed, we saw the results we wanted.

03_DLMClass.jpg

 

Because each autoload location is associated with a single LASR library and each LASR library can be configured with only one default delimiter, administrators of large systems with varying data requirements may have to configure separate autoload libraries for data that is delimited with non-standard separators. Fortunately, the SAS Deployment Manager makes the job of creating additional autoload directories quite easy to do.


Knowing a little more about how names of files dropped in the autoload location affect data import and how to set the default delimiter for .TXT files, administrators have the flexibility to make sure users get what they expect from self-service data loading.


Contributors
Version history
Last update:
‎06-12-2017 04:35 PM
Updated by:

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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 Tags