> ## 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: RegionCodeFromIP

> Extracts the two character ISO-3166-2 (US or Canada) or FIPS 10-4 code for the state/region from a given IPv4 string (dot-decimal notation).

## Description

Extracts the two character ISO-3166-2 (US or Canada) or FIPS 10-4 code for the state/region from a given IPv4 string (dot-decimal notation).

## Syntax

`RegionCodeFromIP(ipaddress)`

## Examples

`RegionCodeFromIP('69.59.196.211')` returns 'VA'.

## Notes

The function uses GeoLite2 data created by MaxMind, available from [http://www.maxmind.com](https://www.maxmind.com/en/home)

## Return value datatype

String

## Impact of null value

If input is null, returns null.
