converter.connector.csv
¶
Module Contents¶
Classes¶
Connects to a csv file on the local machine for reading and writing data. |
- class converter.connector.csv.CsvConnector(config, **options)¶
Bases:
converter.connector.base.BaseConnector
Connects to a csv file on the local machine for reading and writing data.
Options:
path - The path to the csv file to read/write
write_header - Flag whether the header row should be written to the target when loading data (default: True)
quoting - What type of quoting should be used when reading and writing data. Valid values are all, minimal, nonnumeric and none. Descriptions of these values are given in the python csv module documentation. (default: nonnumeric).
- load(self, data: Iterable[Dict[str, Any]])¶
Loads the data into the connected data object.
- Parameters
data – An iterable of dictionaries representing the data to push to the connected source.
- extract(self) Iterable[Dict[str, Any]] ¶
Extracts the data from the connected source and returns an iterable of dictionaries.
- Returns
An iterable of the extracted data