AsFloat¶
Transforms any type of input into a floating point value.
Integers are simply cast to floats and dates are stored as their seconds representation. Strings are parsed as a float; if parsing fails, the record fails transformation. Supply a default value to substitute when the string cannot be parsed.
Parameters¶
- 1 —
defaultOptional — accepts: FLOAT, NULL -
Default float value used when the input is a string that cannot be parsed as a float. May be
NULL.
Input type¶
DATEFLOATINTSTRING
Output type¶
FLOAT
Examples¶
Default — fail on unparseable input
Default to 0.0 when unparseable
Default to NULL when unparseable