Skip to content

Static

The Static transformer is used to mock a static value.

Alternation

This transformer will not mutate existing row value, it will generate a new value.

Valid Data Types
  • String
  • Number
  • Boolean

Default

Without specifying any options the static transformer will be of type String and have value 'Default value'.

Examples

Default
skifta.toml
[[table.columns]]
name = "column-example"
transformer = "static"

Result: 'Default value'


Specifying String
skifta.toml
[[table.columns]]
name = "column-example"
transformer = { static = { string = "hello" } }

Result: 'hello'


Specifying Number
skifta.toml
[[table.columns]]
name = "column-example"
transformer = { static = { number = 321 } }

Result: 321


Specifying Boolean
skifta.toml
[[table.columns]]
name = "column-example"
transformer = { static = { bool = true } }

Result: true