Class - builtin.xsv.xsv.iov2.input.XsvInput2

JSON Schema

XsvInput2

Read a XSV file using petl.io.csv.fromcsv and provide the data to the remaining steps of the job.

An XSV file is any flat text file containing tabular data separated by a delimiter.

Example usage:

{
    "input": {
        "use": "xsv.iov2#XsvInput2",
        "source": "/var/mitto/data/test_csv.csv",
        "encoding": "ASCII",
        "delimiter": ",",
        "includes_header": true
    },
    "output": {}
}

type

object

properties

  • source

Source

The name of the XSV file for processing.

If source is a relative path, its value will be appended to /tmp/mitto/data

type

string

format

path

  • encoding

Encoding

Specify the file encoding.

Encodings are case insensitive, i.e. both utf-8 and UTF-8 will work. Follow this link for a list of common encodings: https://en.wikipedia.org/wiki/Character_encoding#Common_character_encodings

type

string

examples

ASCII

utf-8

ISO-8859-9

  • noneify

Noneify

Pass in a list of values you wish to convert to null.

Matches will be case sensitive.

examples

(‘’, ‘#Error’)

[‘none’, ‘NONE’, ‘None’]

default

True

anyOf

type

boolean

type

array

items

type

array

items

  • includes_header

Includes Header

Set to false if XSV does not have a header row.

If set to false the first row will be treated as data and names will be given to columns (Ex: col1, col2, etc).

type

boolean

examples

true

false

default

True

  • skip

Skip

Skip x number of lines.

type

integer

minimum

0

default

0

  • errors

Errors

Set the behavior of csv.reader to raise an exception on bad CSV input.

type

string

default

strict

  • delimiter

Delimiter

The delimiter.

The character that separates values in the XSV file.

type

string

examples

,

;

:

\|

\\t

\\\\\’

\\\\\”

default

,

additionalProperties

False