Skip to content

Change Type

Transform

Coerce values in selected columns to a target data type. Each rule names a column and a target type; numbers and dates take additional parsing options. Use it after parsing CSV (where every cell starts as a string) or before arithmetic, sorting, or date filtering relies on a real type.

Change Type is a streaming transform: each row is rewritten in place, with the named columns coerced cell by cell. Other columns pass through unchanged. Columns named in the rules but missing from a given row are left alone — there is no “create column if missing” behavior.

Empty cells (empty string, null, undefined) coerce to "" for the string target and to null for every other target. A coercion that cannot parse the value (for example, "abc" to number) returns null for that cell and emits a warning to the execution logger; the row itself is still emitted, so downstream transforms see the column as null rather than as a dropped row.

If no rules are configured, the transform is a passthrough.

Input: One tabular data connection. Output: The same columns, with the named columns retyped.

An ordered list of rules. Each rule:

FieldTypeDescription
columnstringColumn name to coerce. Required.
targetType"string" | "number" | "integer" | "boolean" | "date" | "datetime"Target type. Required.
decimalSeparator"period" | "comma"Used by number and integer targets. "comma" strips . thousands then parses , as decimal. Defaults to "period".
dateInputFormatstringUsed by date and datetime targets. "auto" falls through to the JS Date parser. Defaults to "auto".

Rules are applied in order, but each rule targets a different column, so order is not significant for the output.

You imported a CSV where the amount column arrived as strings. Downstream sums need real numbers.

Before:

customeramount
Acme Corp1250
Beta Inc750
Gamma LLC1100

Configuration: One rule — column: amount, target type: number.

After:

customeramount
Acme Corp1250
Beta Inc750
Gamma LLC1100

Your source uses commas for decimals and periods as thousands separators. You want canonical floats.

Before:

productprice_eu
Widget1.250,50
Gadget99,90
Doohickey2.000,00

Configuration: One rule — column: price_eu, target type: number, decimal separator: comma.

After:

productprice_eu
Widget1250.5
Gadget99.9
Doohickey2000

Your input has yes/no/1/0/true/false mixed in a flag column. You want a real boolean.

Before:

useractive
Aliceyes
Bob0
CarolTRUE
Davemaybe

Configuration: One rule — column: active, target type: boolean.

After:

useractive
Alicetrue
Bobfalse
Caroltrue
Dave
  • Failed coercions become null, not errors. Unparseable values like "abc" → number or "maybe" → boolean are written as null and a warning is logged; the row continues to flow. Downstream transforms see a null cell, not a missing row. See apps/web/src/transforms/type-coercion/logic.ts:104-130.
  • Empty cells are special-cased per target. Empty string, null, and undefined all coerce to "" for string targets and to null for everything else, regardless of input type. This skips the parser entirely. See apps/web/src/transforms/type-coercion/logic.ts:36-39.
  • The boolean parser only accepts a fixed token set. true/false/yes/no/1/0/on/off (case-insensitive) parse; everything else becomes null. There is no “any non-empty string is true” fallback. See apps/web/src/transforms/type-coercion/conversions.ts:38-47.
  • Formula — derive a new column from existing values; pair with Change Type when arithmetic needs real numbers.
  • Format Dates — reformat a date column for output; Change Type to a date first, Format Dates second.
  • Replace Values — rewrite values before coercion when the source uses non-standard tokens.