All Products
Search
Document Center

MaxCompute:Network functions

Last Updated:Oct 22, 2025

MaxCompute SQL provides network functions to process network data of the STRING and BINARY types. You can use these functions to transform IP address formats, parse URLs, and retrieve network masks. This topic describes the network functions and their features.

Function

Feature

NET_HOST

Parses the hostname from a URL of the STRING type.

NET_IP_FROM_STRING

Converts an IPv4 or IPv6 address from the STRING format to the BINARY format.

Note

If the input parameter is invalid, an error is returned.

NET_IP_NET_MASK

Generates an IPv4 or IPv6 network mask from a specified mask length.

NET_IPV4_TO_INT64

Converts an IPv4 address from the BINARY format to the BIGINT format.

NET_IP_TO_STRING

Converts an IPv4 or IPv6 address from the BINARY format to the STRING format.

NET_PUBLIC_SUFFIX

Parses the public suffix, such as com, org, or net, from a URL of the STRING type.

NET_REG_DOMAIN

Parses the registered domain name from a URL of the STRING type. The registered domain name consists of the public suffix and the preceding label.

NET_SAFE_IP_FROM_STRING

Converts an IPv4 or IPv6 address from the STRING format to the BINARY format.

Note

This function is similar to NET_IP_FROM_STRING. However, it returns NULL instead of an error if the input is invalid.