Excerpt |
---|
Evaluates a String input against the Integer datatype. If the input matches, the function outputs an Integer value. Input can be a literal, a column of values, or a function returning String values. |
After you have converted your strings values to integers, if a sufficient percentage of input strings from a column are successfully converted to the other date type, the column may be retyped.
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: parseint(strInput) as: 'convertedInt' |
---|
|
parseint(strInput) |
Output: Returns the Integer data type value for strInput
String values.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:parseint(str_input) |
---|
|
parseint(str_input) |
Argument | Required? | Data Type | Description |
---|
str_input | Y | String | Literal, name of a column, or a function returning String values to match |
Literal, column name, or function returning String values that are to be evaluated for conversion to Integer values.
- Missing values for this function in the source data result in null values in the output.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String | '5' |
Example - type parsing functions
Include Page |
---|
| EXAMPLE - Type Parsing Functions |
---|
| EXAMPLE - Type Parsing Functions |
---|
|