This connector is used to read CSV files from local file system.

Connection configuration

No connection is required by this connector

Test case configuration

Test case configuration

NameMandatoryDefaultDescription
pathyesPath to the CSV
delimiterno,Column delimiter
infernoTrueInfer the column names
namesnoNoneSequence of column labels to apply
usecolsnoNoneSubset of columns to select
skiprowsnoNoneLine numbers to skip or number of lines to skip (int) at the start of the file
skipfooterno0Number of lines at bottom of file to skip (Unsupported with engine='c')
nrowsnoNoneNumber of rows of file to read. Useful for reading pieces of large files
lineterminatornoNoneCharacter used to denote a line break
quotecharno'"'Character used to denote the start and end of a quoted item
encodingno"utf-8"Encoding to use for UTF when reading/writing
enginenoNoneParser engine to use
SchemanoNoneSchema to use for the CSV file

Example

Example CSV:
  source:
    connection: mysql_example
    type: mysql
    query: | 
        select * 
            from employees
            where hire_date < "2000-01-01"
  expected:
    type: csv
    infer: True
    delimiter: ";"
    encoding: "utf-8"
    engine: "python"
    path: data/employeesbefore2000.csv

Exemple with schema

``` yaml Example CSV with schema: source: connection: mysql_example type: mysql query: | select * from sales where sale_date < "2000-01-01" expected: type: csv infer: False delimiter: ";" encoding: "utf-8" schema: sale_id: string sale_date: datetime sale_amount: float