ipv4_to_int64
ipv4_to_int64(ipv4: string) -> int64
Given an IPv4 address string in dotted-quad format, convert the address to an integer representing the address.
Addresses are handled in big-endian (network) byte order.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col ipint:ipv4_to_int64(ipstr)
Assuming there's a string input column with IP addresses, outputs the corresponding parsed ip addresses as integers in network byte order.
| ipstr (input) | ipint (output) |
|---|---|
| 8.8.4.4 | 134743044 |
| 10.0.0.1 | 167772161 |
| 10.0.0.1/16 | null |
| 127.0.0.1 | 2130706433 |
| 127.0.0.1/24 | null |
| 128.1.2.3 | 2147549699 |
| 172.30.2.3 | 2887647747 |
| 192.168.0.3 | 3232235523 |
| 200.1.2.3 | 3355509251 |
| 1.2.3.300 | null |
| 1.2.3.4.5 | null |
| 1.2.3 | null |
| localhost | null |
Updated 8 days ago