PARSE_IP

functionsupportedCore SQL functions

docs.snowflake.com ↗

String & binary functions

Returns a JSON object consisting of all the components from a valid INET (Internet Protocol) or CIDR (Classless Internet Domain Routing) IPv4 or IPv6 string.

Syntax

supportedpartialnot supportednot scored

PARSE_IP(<expr>, '<type>' [, <permissive>])

Parameters

NameRequiredDescription
exprrequiredA string expression.
typerequiredA string that identifies the type of IP address. Supports either INET or CIDR; the value is case-insensitive.
permissiveoptionalFlag that determines how parse errors are handled: If set to 0, parse errors cause the function to fail. If set to 1, parse errors result in an object with the error field set to the respective error message (and no other fields set). Default value is 0.

Returns

OBJECT.

Usage notes