> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: ParseIntOrDefault

> Safely convert a string to an integer, returning a specified default value if the conversion fails. Use for resilient numeric parsing in ETL jobs.

## Description

Attempts to convert a string representation of a number to an integer numeric equivalent. If successful, returns the string as an integer numeric value, otherwise returns the default value.

## Syntax

`ParseIntOrDefault(string_expression, default_value)`

## Arguments

*string\_expression* - string

*default\_value* - integer

## Examples

`ParseIntOrDefault(string1,42)` Using string1 as input

ParseIntOrDefault('2015',42) Will output: "2015"

ParseIntOrDefault('School',42) Will output: "42"

## Return value datatype

Int

## Impact of null value

If input is null, returns null.
