Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0822
Excerpt

Evaluates a String input against the Decimal datatype. If the input matches, the function outputs a Decimal value. Input can be a literal, a column of values, or a function returning String values.

After you have converted your strings values to decimals, if a sufficient percentage of input strings from a column are successfully converted to the other date type, the column may be retyped. 

D s lang vs sql

D s
snippetBasic

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: parsefloat(strInput) as: 'convertedDecimal'

parsefloat(strInput)

Output: Returns the Integer data type value for strInput String values.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:parsefloat(str_input)

parsefloat(str_input)


ArgumentRequired?Data TypeDescription
str_inputYStringLiteral, name of a column, or a function returning String values to match

D s lang notes

str_input

Literal, column name, or function returning String values that are to be evaluated for conversion to Decimal (Float) values.

  • Missing values for this function in the source data result in null values in the output.
  • Multiple columns and wildcards are not supported.

D s
snippetusage


Required?Data TypeExample Value
YesString'5'


D s
snippetExamples

Example - type parsing functions

Include Page
EXAMPLE - Type Parsing Functions
EXAMPLE - Type Parsing Functions

D s also
labeltype