Read XBase File
Reads records from an XBase file (.dbf)
Processing
The steps reads rows from *.dbf files created by database systems based on XBase.
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 |
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 |
Meta-data about records stored in the file. Each field is a dict of the form {:name string, :type_code string} . |
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 |