BookmarkSubscribeRSS Feed

SAS Viya 3.4: New Local File Advanced Import Options

Started ‎08-17-2018 by
Modified ‎08-17-2018 by
Views 3,736

With the release of Viya 3.4, there are now new advanced options available when importing local data files in the user interface.  These options are on the Advanced tab and are:

 

  • Unique ID – provides the option to add a column that contains a unique value for each row imported. You can specify the name of the column and select to replace an existing column, if desired.
  • Additional Input Options – enables you to specify additional input options not available on the File Specifications tab that might be needed when importing the file.

 

1_AdvancedImportOptions.png

Note: The Additional Input Options selection is only available for delimited text files.

 

Let's look at an example of using these new advanced options when importing a local delimited text file. Here is an image of the file I want to import.

 

2_ImportFile.png

 

Notice that the rows do not have a unique identifier and there are leading and trailing blanks in some columns.  I will use the new advanced import options to address these issues when I import the data.

 

First, I set up the local text file import as usual on the File Specifications tab.

 

3_ImportFileSpecifications.png

 

Next, I select the Advanced tab.  Both new advanced options are displayed since I am importing a local delimited text file.

 

1_AdvancedImportOptions.png

 

To address the issue of no unique identifier for the rows, I check the Unique ID option and name the new column Unique_ID.   There is also an option to Replace column if it already exists on the local file.

 

4_UniqueID.png

 

Next, to address the issue of leading and trailing blanks in columns, I check the Additional Input Options box and add an option called stripBlanks which is type Boolean and set the value to True in order to have leading and trailing spaces stripped from the columns when the file is imported.

 

5_AdditionalInputOptions.png

 

Finally, I import the local file by selecting the Import Item button and then navigate to the CAS library where I imported the data and view the results.

 

6_ImportResults.png

 

As you can see on the Sample Data tab, I now have a Unique_ID column by using the Unique ID option and have removed the leading and trailing spaces in columns by using the Additional Input Option stripBlanks.

 

For more information on SAS Viya 3.4 and importing local files, you can refer to the documentation on Importing Local Data Files.

Comments

Hi

We are using SAS Viya 3.4 and we are currently facing issue with import of files above 30 MB irrespective of file type. Error prompt stating " Unable to contact the CAS Server/Server timed out,

Your maxFileUploadSize setting is most likely set to a value below 30MB.  For more information refer to the Usage Notes for Importing Local Data Files - Notes for All Local Data Files section of the SAS Data ...documentation. 

 

Hi

The same is set to -1,NO LIMIT.

##- Please type your reply above this line. No attachments.

Sorry if that is the case and you have re-started your services after making that config change, then I suggest you open a track with Tech Support to see if they can help.

Hi
It has been 3 months, still issue is pending for resolution

I have to import a csv local file that has the first field numeric with leading zeros. Is there a option to preserve the leading zeros while keeping the column type numeric.

 

Version history
Last update:
‎08-17-2018 10:09 AM
Updated by:
Contributors

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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