Basics

Introduction to ysv configuration language

Transformations

Everything that ysv is doing to the data is called a transformation. A transformation basicly takes data from somewhere (or from previous transformation in the chain) and does something to that data.

For example, input transformation just fetches a value from the input dataset, and uppercase - naturally - uppercases a value it receives.

For every column in the output dataset, you can write down a chain of transformations. Like this:

version: 1
columns:
  - input: CompanyType
  - uppercase
  - replace:
    "LTD": "LIMITED"
    "INC": "INCORPORATED"

Transformations are executed topdown, one by one.

Data Types

Values that ysv is working on are typed. Supported types are:

  • String (the default type)

  • Integer

  • Float

  • Date

  • Boolean

  • List

This feature is still in development, and more use cases will be added a bit later, but for now consider this example:

columns:
  date:
    - input: "Transaction Date"
    - date: "%m/%d/%Y"

This transformation will attempt to parse the date from input dataset. The default format of outputting the date is YYYY-MM-DD, and that's what will be printed in the output.

Last updated