When you import a local
data file, you take a file such as a spreadsheet, delimited text file,
or SAS data set from your desktop, and then the file is transferred
as data to SAS LASR Analytic Server. This enables you to access data
without needing assistance from an administrator or information technology
group.
Note: When you import a SAS data
set, it is not processed with PROC IMPORT. SAS data sets are transferred
to output with a DATA step.
Note: Only
the data builder can output a SAS data set or a DBMS table. The explorer
and designer can import data to SAS LASR Analytic Server only.
You can import data
files that are available from the file systems on your PC. This includes
local file systems such as C:\
on Windows
machines and paths such as /home/$USER
on
UNIX machines. Network file systems and shared folders are also included,
such as UNC paths like \\nas\spreadsheets
.
To import data from
a Microsoft Excel spreadsheet, delimited text file, or SAS data set:
-
Click the link for the
type of data file that you want to import, and then select the file.
-
Specify the following
input file parameters:
Note: For SAS data sets, there
are no parameters to specify.
Spreadsheet options
The following options
are available when you import a Microsoft Excel spreadsheet:
Select worksheet
Select All or
the check boxes for the worksheets to import.
Begin import on row
The default is to import
data from the first row of the spreadsheet. If the data begins on
a different row, make changes.
Includes column names
Select this check box
when the row on which to begin the import has the column names.
Text file options
The following options
are available when you import a delimited text file:
Delimiter
Select the delimiter
that is used in the text file to import. You can specify a single
character to use as a user-defined delimiter.
First row contains column names
Select this check box
when the text file includes the column names on the first row of the
file.
Data records begin on row
The default is to import
data records from the first row. If you select First row
contains column names, then this value increments to
2.
Number of rows to scan
The default is to read
up to the first 500 rows from the file to determine the data type
and length for each column. Smaller values cause the import to complete
quickly, but you risk the chance of determining too short a value
for character columns. Larger values reduce the chance of truncating
character columns, but they increase processing time.
Encoding
Select the encoding
of the text file. If you are importing UTF-8 or UTF-16 data, then
make sure that the SAS Application Server is a Unicode server or that
all of the file contents can be successfully transcoded to the encoding
of the SAS Application Server.
-
(Optional) Click
Preview to
view the data. Preview displays up to 500 rows from the file.
Tip
Previewing the data can help
you determine whether you specified the correct encoding.
-
(Optional) In the
Output
Table section, enter the name for the table and a description.
The description is limited to 256 characters. Review the library and
location settings by clicking
Advanced and
make changes if necessary.
You do not have access
to the Advanced section if you are using
the explorer or designer and do not have the Build Data capability.
Instead, you can import the data to a general-purpose area or select Store
the table in a private location to prevent other users
from accessing the data.
-