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.

Wrangle vs. SQL: This function is part of Wrangle, a proprietary data transformation language. Wrangle is not SQL. For more information, see Wrangle Language.

Basic Usage


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

Syntax and Arguments


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

For more information on syntax standards, see Language Documentation Syntax Notes.


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.

Usage Notes:

Required?Data TypeExample Value


Tip: For additional examples, see How-to Guides.

Example - type parsing functions

This example shows how to use the following parsing functions for evaluating input against the function-specific data type:

  • PARSEBOOL - If the input String value is a valid Boolean value, the value is returned as a Boolean data type value. See PARSEBOOL Function.
  • PARSEDATE - If the input String value is valid against the specified or default Datetime formats, the value is returned as a Datetime value. See PARSEDATE Function.
  • PARSEFLOAT - If the input String value is a valid Float (Decimal) value, the value is returned as a Decimal data type value. See PARSEFLOAT Function.
  • PARSEINT - If the input String value is a valid Integer value, the value is returned as an Integer data type value. See PARSEINT Function.


The following table contains data on a series of races.

6t2/8/2020 10:16:00 AM225.44
28.22 sec
12FALSE2/8/2020 10:16:00 AM427.11

As you can see, this dataset has variation in values (FALSE, f, no, n) and problems with the data.


When the data is first imported, it may be properly typed for each column. To use the parsing functions, these columns should be converted to String data type:

Transformation Name Change column data type
Parameter: Columns disqualified,date,racerId,time_sc
Parameter: New type String

Now, you can parse individual columns.

disqualified column:

Transformation Name Edit column with formula
Parameter: Columns disqualified
Parameter: Formula PARSEBOOL($col)

racerId column:

Transformation Name Edit column with formula
Parameter: Columns racerId
Parameter: Formula PARSEINT($col)

time_sc column:

Transformation Name Edit column with formula
Parameter: Columns time_sc
Parameter: Formula PARSEFLOAT($col)

date column:

For the date column, the PARSEDATE function supports a default set of Datetime formats. Since some of the listed formats are different from these defaults, you must specify all of the formats. These formats are specified as an array of string values as the second argument of the function:

Tip: For the PARSEDATE function, it's useful to use the Preview to verify that all of the dates in the column are represented in the array of output formats. You can see the available output formats through the data type menu at the top of a column. See Choose Datetime Format Dialog.

Transformation Name Edit column with formula
Parameter: Columns date
Parameter: Formula PARSEDATE($col, ['yyyy-MM-dd','yyyy\/MM\/dd','M\/d\/yyy hh:mm','MMMM d, yyyy','MMM d, yyyy'])

After all of the date values have been standardized to the output format of the PARSEDATE function, you may choose to remove the time element of the values:

Transformation Name Replace text or pattern
Parameter: Column date
Parameter: Find ` {digit}{2}:{digit}{2}:{digit}{2}{end}`
Parameter: Replace with ''


After executing the above steps, the data appears as follows. Notes on each column's output are below the table.


disqualified column:

  • The PARSEBOOL function normalizes all valid Boolean values to either false or true.

racerId column:

  • The PARSEINT function writes invalid values as null values.
  • The function writes empty values as null values.
  • The value 33 remains, since it is a valid Integer. This value should be fixed manually.


  • The PARSEFLOAT function writes the source value 25.00 as 25 in output.
  • The source value -25.22 remains. However, since this is time-based data, it needs to be fixed.
  • Invalid values are written as nulls.

date column:

  • All values are written in the standardized format: yyyy-MM-dd HH:mm:ss. Time data has been stripped.