Package smile.io

Interface SAS


public interface SAS
Reads SAS7BDAT datasets. SAS7BDAT is currently the main format used for storing SAS datasets across all platforms.

Leveraging the lightweight Java library Parso (https//github.com/epam/parso), no proprietary SAS software is required.

  • Method Details

    • read

      static DataFrame read(Path path) throws IOException
      Reads a SAS7BDAT file.
      Parameters:
      path - the input file path.
      Returns:
      the data frame.
      Throws:
      IOException - when fails to write the file.
    • read

      static DataFrame read(String path) throws IOException, URISyntaxException
      Reads a SAS7BDAT file.
      Parameters:
      path - the input file path.
      Returns:
      the data frame.
      Throws:
      IOException - when fails to write the file.
      URISyntaxException - when the file path syntax is wrong.
    • read

      static DataFrame read(InputStream input, int limit) throws IOException
      Reads a limited number of records from a SAS7BDAT file.
      Parameters:
      input - a SAS7BDAT file input stream.
      limit - the number number of records to read.
      Returns:
      the data frame.
      Throws:
      IOException - when fails to write the file.