Skip to content

๐Ÿงฑ Static Transformer โ€‹

The Static transformer is used to mock a static value.

๐Ÿ” Alternation โ€‹

This transformer does not mutate the existing row value โ€” it generates a new value.

โœ… Valid Data Types โ€‹

  • String
  • Number
  • Boolean

โš™๏ธ Options โ€‹

OptionTypeDescriptionDefault
stringStringStatic string value to use.'Default value'
numberNumberStatic number value to use.None
boolBooleanStatic boolean value to use.None

๐Ÿงช Examples โ€‹

Example 1: Default behavior โ€‹

toml
[[table.columns]]
name = "column-example"
transformer = "static"
Output: "Default value"

Example 2: Specifying string โ€‹

toml
[[table.columns]]
name = "column-example"
transformer = { static = { string = "hello" } }
Output: "hello"

Example 3: Specifying number โ€‹

toml
[[table.columns]]
name = "column-example"
transformer = { static = { number = 321 } }
Output: 321

Example 4: Specifying bool โ€‹

toml
[[table.columns]]
name = "column-example"
transformer = { static = { bool = true } }
Output: true