Network functions

更新时间:
复制 MD 格式

MaxCompute SQL provides network-related functions that support processing STRING and BINARY network data. These functions enable capabilities such as IP address format conversion, URL parsing, and network mask retrieval. This topic describes the network functions and their features.

Function

Description

NET_HOST

Parses the hostname from a URL string 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 or illegal, an error is returned.

NET_IP_NET_MASK

Generates the corresponding IPv4 or IPv6 network mask address based on a specified network 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 string of the STRING type.

NET_REG_DOMAIN

Parses the registered or registrable domain name (i.e., the public suffix plus the preceding label) from a URL string of the STRING type.

NET_SAFE_IP_FROM_STRING

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

Note

Similar to theNET_IP_FROM_STRINGfunction, but returns NULL instead of raising an error if the input parameter is considered invalid.

TCPING

Verifies whether a specific port of a target domain name or IP address is reachable.