TRY_INET_ATON (Lakehouse v1)
A função try_inet_aton recebe a representação decimal com pontos de um endereço IPv4 como string e retorna o valor numérico do endereço IP informado na forma de um inteiro.
Sintaxe no Analyze
Seção intitulada “Sintaxe no Analyze”func.try_inet_aton(<str>)Exemplos no Analyze
Seção intitulada “Exemplos no Analyze”func.try_inet_aton('10.0.5.9')
┌────────────────────────────────┐│ func.try_inet_aton('10.0.5.9') │├────────────────────────────────┤│ 167773449 │└────────────────────────────────┘Sintaxe SQL
Seção intitulada “Sintaxe SQL”TRY_INET_ATON( <str> )Aliases
Seção intitulada “Aliases”Tipo de retorno
Seção intitulada “Tipo de retorno”Inteiro.
Exemplos de SQL
Seção intitulada “Exemplos de SQL”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 │└────────────────────────────────────────────────────────────────┘