AsInt¶
Transforms any type of input into an integer.
Floats are rounded down. Dates are stored as their seconds representation. Strings are parsed as an integer; if parsing fails the record fails transformation. Supply a default value to substitute when the string cannot be parsed.
Parameters¶
- 1 —
defaultOptional — accepts: INT, NULL -
Default integer value used when the input is a string that cannot be parsed as an integer. May be
NULL.
Input type¶
DATEFLOATINTSTRING
Output type¶
INT
Examples¶
Default — fail on unparseable input
Default to 42 when unparseable