URL functions support extracting fields from standard URL paths. A standard URL is as follows:

[protocol:][//host[:port]][path][? query][#fragment]

Common URL functions

Function Name Meaning Example
url_extract_fragment(url) Extracts the fragment from a URL and the result is of varchar type. *| select url_extract_fragment(url)
url_extract_host(url)  Extracts the host from a URL and the result is of varchar type. *|select url_extract_host(url)
url_extract_parameter(url, name) Extracts the value of the name parameter in the query from a URL and the result is of varchar type. *|select url_extract_parameter(url)
url_extract_path(url) Extracts the path from a URL and the result is of varchar type. *|select url_extract_path(url)
url_extract_port(url) Extracts the port from a URL and the result is of bigint type. *|select url_extract_port(url)
url_extract_protocol(url) Extracts the protocol from a URL and the result is of varchar type. *|select url_extract_protocol(url)
url_extract_query(url)  Extracts the query from a URL and the result is of varchar type. *|select url_extract_query(url)
url_encode(value)  Encodes a URL. *|select url_encode(url)
url_decode(value) Decodes a URL. *|select url_decode(url)