TRY_INET_ATON (Lakehouse v1)
try_inet_aton function is used to take the dotted-quad representation of an IPv4 address as a string and returns the numeric value of the given IP address in form of an integer.
Analyze Syntax
Section titled “Analyze Syntax”func.try_inet_aton(<str>)Analyze Examples
Section titled “Analyze Examples”func.try_inet_aton('10.0.5.9')
┌────────────────────────────────┐│ func.try_inet_aton('10.0.5.9') │├────────────────────────────────┤│ 167773449 │└────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TRY_INET_ATON( <str> )Aliases
Section titled “Aliases”Return Type
Section titled “Return Type”Integer.
SQL Examples
Section titled “SQL Examples”SELECT TRY_INET_ATON('10.0.5.9'), TRY_IPV4_STRING_TO_NUM('10.0.5.9');
┌────────────────────────────────────────────────────────────────┐│ try_inet_aton('10.0.5.9') │ try_ipv4_string_to_num('10.0.5.9') ││ UInt32 │ UInt32 │├───────────────────────────┼────────────────────────────────────┤│ 167773449 │ 167773449 │└────────────────────────────────────────────────────────────────┘