MeridianMERIDIAN

IPv4 Address

technology.internet.ip_v4

Standard 4-octet IPv4 address format (e.g., 192.168.1.1). Resolves to VARCHAR with INET validation. Can optionally parse to DuckDB INET type with the inet extension.

Try a value

IPv4 Address's rule accepts it.

Reads it as 192.168.1.1

Also accepted by

Use it

Shell
finetype infer -i '192.168.1.1' --mode column
# → technology.internet.ip_v4
DuckDB
SELECT ft_infer('192.168.1.1');
-- → 'technology.internet.ip_v4'
Cast template: {col} is your column
CAST({col} AS VARCHAR)

Pattern

Regular expression
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
ValueLengthShape
192.168.1.111matches
8.8.8.87matches
127.0.0.19matches
10.0.0.08matches
192.168.1.10rejected: one character short

Similar types

1 of the 12 other internet types accept every one of these samples on shape alone.

Background

Origin

The Internet Protocol that IPv4 addresses belong to is specified in RFC 791, dated September 1981.[1] RFC 791 states that addresses are fixed length of four octets (32 bits).[1] IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983.[2]

IPv4 addresses are most often written in dot-decimal notation: four octets expressed individually in decimal numbers, without any extra leading zeros, separated by periods.[2] The primary address pool of the Internet, maintained by IANA, was exhausted on 3 February 2011.[2]

Use

RFC 6890, Special-Purpose IP Address Registries, lists 127.0.0.0/8 as the Loopback block.[3]

Python's ipaddress module accepts an IPv4 address as four decimal integers in the inclusive range 0 to 255, separated by dots.[4] The ipaddress documentation says leading zeroes are not tolerated, to prevent confusion with octal notation.[4] Since Python 3.9.5, leading zeros in an IPv4 address string are treated as an error.[4] When a column holds values like 010.001.001.001, decide deliberately what they mean before parsing, rather than letting whichever library is to hand decide for you. (Meridian's view)

DuckDB's inet extension defines the INET data type for storing IPv4 and IPv6 Internet addresses.[5] DuckDB's inet extension supports the CIDR notation for subnet masks.[5] In DuckDB, the host component of an INET value can be extracted using the HOST() function.[5] Keeping the original text alongside a parsed address column is cheap insurance, because a column that mixes bare addresses, prefixes and IPv6 values tends to surprise someone later. (Meridian's view)

Where you'll meet it

Google's own Public DNS documentation gives its IPv4 addresses as 8.8.8.8 and 8.8.4.4.[6]

How it's detected

transform_ext uses DuckDB's inet extension if available. Without the extension, stored as VARCHAR but validated as IPv4.

Schema

https://meridian.online/schemas/technology.internet.ip_v4 · Frictionless type string

finetype taxonomy technology.internet.ip_v4 -o json-schema

Aliases

ipv4

Type Registry