Read SAS File
Reads records from SAS file (.sas7bdat)
Processing
The steps reads rows from *.sas7bdat files.
Settings
Name | Type | Description |
---|---|---|
Filesystem |
dict |
The filesystem to use. Evaluated for each input row |
File |
string |
The file to read from Evaluated for each input row |
Charset |
string |
Charset encoding of character data Evaluated for each row |
Timezone |
string |
Timezone used for extracted datetimes. Evaluated for each input row |
Row Limit |
long |
Limit data lines read from the file.
Evaluated for each input row |
Read fields
Defines how fields are extracted from source fields.
Evaluated for each input row
- Type
- Data type of the field. Field values are implicitly cast to this type.
- Name
- Name of the field.
- Mapping
- Index used to access the data in the source record.
- Use an integer number
n
to access the n-th field.
Fields are indexed starting at 0. - Use a string to access a source field by name.
This is only possible if there is a header line containing field names.
- Use an integer number
- Conversion
- Optional function parsing the source field from string to its target type.
- Use
nil
to leave the source data as it is. It will be cast to the target type. - Supply a function
(string x) -> any
, the source field value is passed in asx
and the return value is used for the output field.
Results
Name | Type | Description |
---|---|---|
fields |
list |
Intermal SAS meta-data about records stored in the file. Each field is a dict of the form:
|
values |
list |
A list representation of the currently read record. Field order is as indicated by fields |
record |
dict | A dict representation of the currently read record |