Import a SAS, SPSS, or Stata Dataset File

Users of LityxIQ may have datasets that were originally created or stored by an outside statistical processing system, such as SAS, SPSS, or Stata, and may want to use this data directly in LityxIQ without having to use an outside tool to covert it to an appropriate format.  LityxIQ allows you to import files in these formats directly into a LityxIQ dataset.  The file types supported are:

  • SAS datasets (.sas7dat files)
  • SAS Xport Files (.xpt files)
  • SPSS datasets (.sav files)
  • Stata datasets (.dta files)

Note that in each of these cases, these dataset formats are simply files, and so can be stored and retrieved from a variety of types of file locations.  For example, they can be placed on FTP sites, in Google Drive, in an Amazon S3 bucket, or in the LityxIQ File Manager (see for more on the File Manager).  Regardless of the location of the file you wish to import, the method and options for importing are the same.

Whether creating a new raw dataset ( or editing an existing one (, the options you will use are on the Data Source tab.



Location - As mentioned above, the location of a delimited text file can be the LityxIQ Manager or a Data Connection you have setup.  Select the location/connection where the file can be found.

Use Filename Template - In this discussion, we will use the setting "Standard Import - No Template".  The other options available are described elsewhere, but in any case do not affect the other settings for the delimited text file.

Filename - When you click the Filename box, a file selection dialog will appear similar to that shown below.  LityxIQ will make the connection to the chosen location and display the files and folders it finds.  Navigate the files and folders to find the one you want to import.  See the document for more help on navigating the files and folders and selecting a file.  The document is specific to the LityxIQ File Manager, but navigation is similar regardless of the location.

Compressed File - LityxIQ support import of files that are not compressed, or are compressed in a variety of formats. 

  • Not Compressed - select this option if the file is not compressed (the default).
  • Gz, Bz2, or Zip - select one of these options if the delimited text file is stored in these compressed formats. 
  • Special note - In the case of a zip file, the delimited text file will be embedded as one of potentially many files compressed within the zip file.  In this case, additional options will appear. 
    • You must enter the name of the delimited file within the text file, including a path to that file if the zip contains folders.  Note there is a special template that can be used when entering the name of the text file: [@basefilename].  This template code will be replaced with the zip filename minus the ".zip" extension of that name.  In the example below, the zip file selected is "" and the Filename is entered as "[@basefilename].txt".  LityxIQ will translate the filename it attempts to find as "S0037734.txt".  In other words, [@basefilename] is replaced by "S0037734".  This approach is helpful if you want to help automate an import process where the filename within the zip file is always the same as the zip file itself, except with a changed extension.
    • If the zip file has been saved with a password, you enter that in the Password box.


File Type - Select the correct file type.  For example:

Row Limit- Enter the number of rows to import. Use 0 to import all rows, the default.  This is a way to test settings on a much larger file by only importing, say, the first 100000 rows before trying the entire file.

Trim Trailing Spaces - With this box checked, spaces at the end of strings that are imported are automatically removed being stored in the LityxIQ dataset.


Preview Window