IP functions
Applies to: Databricks Runtime 18.2 and above
This feature is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage Databricks previews.
IP functions operate on IPv4 and IPv6 addresses and CIDR blocks represented as STRING or BINARY values.
Import Databricks functions to get IP functions (Databricks Runtime)
To import IP functions for Python or Scala in notebooks, use the following commands:
- Python
- Scala
from pyspark.databricks.sql import functions as dbf
import com.databricks.sql.functions._
List of IP functions
Function | Description |
|---|---|
Returns the canonical binary representation of an IP address or CIDR block. | |
Returns the canonical string representation of an IP address or CIDR block. | |
Returns the canonical representation of an IPv4 or IPv6 CIDR block. | |
Returns | |
Returns the canonical representation of an IPv4 or IPv6 address. | |
Returns the network portion of a CIDR block in its canonical form. | |
Alias for | |
Returns the last address of a CIDR block in its canonical form. | |
Returns the prefix length of a CIDR block. | |
Returns the IP version (4 or 6) from an IP address or CIDR block. | |
Returns the canonical binary representation of an IP address or CIDR block, or | |
Returns the canonical string representation of an IP address or CIDR block, or | |
Returns the canonical representation of an IPv4 or IPv6 CIDR block, or | |
Returns the canonical representation of an IPv4 or IPv6 address, or |