This article introduces the syntax of URL functions supported by Log Service and provides usage examples for common scenarios.
tip
In Log Service analysis statements (SQL statements), single quotes ('') are used to enclose string literals; unquoted or double-quoted ("") characters represent field names or column names. For example, 'time' represents a string, while time or "time" represents a field name or column name.
The URL_ENCODE function encodes a URL.
- Return value description
- The return value is of Varchar type.
- Encode the value of the test_url_text field.
-
- Query and analysis statements
- Query and analysis results
-
The URL_DECODE function decodes URLs.
- return value description
- the return value is of varchar type.
- decode the value of the test_url_text field.
-
- search and analyze statement
- Query and analysis results
-
URL_EXTRACT_FRAGMENT function
The URL_EXTRACT_FRAGMENT function extracts fragment information from a URL.
- Return value description
- The return value is of the Varchar type.
- Extract Fragment information from the test_url_text field value.
-
- Query and analysis statements
- Query and analysis results
-
URL_EXTRACT_HOST function
The URL_EXTRACT_HOST function extracts Host information from a URL address.
- Return value description
- The return value is of Varchar type.
- Extract the Host information from the test_url_text field.
-
- Query and analysis statements
- Query and analysis results
-
URL_EXTRACT_PARAMETER function
The URL_EXTRACT_PARAMETER function extracts the value of a specified parameter from the query part of a URL.
- Return value description
- The return value is of Varchar type.
- Extract the value of the region parameter from the url field.
-
- Query and analysis statements
- Query and analysis results
-
URL_EXTRACT_PATH function
The URL_EXTRACT_PATH function extracts the access path information from a URL.
- return value description
- the return value is of type Varchar.
- extract the access path information from the url field value.
-
- query and analyze statement
- query and analysis results
-
URL_EXTRACT_PORT function
The URL_EXTRACT_PORT function extracts port information from a URL.
- return value description
- the return value is of varchar type.
- Extract port information from the url field value.
- Query and analysis statements
- Query and analysis results
-
URL_EXTRACT_PROTOCOL function
The URL_EXTRACT_PROTOCOL function extracts protocol information from a URL.
- Return value description
- The return value is of type Varchar.
- Extract protocol information from the url field value.
- Query and analysis statements
- Query and analysis results
-
URL_EXTRACT_QUERY function
The URL_EXTRACT_QUERY function extracts the complete query part from a URL.
- Return value description
- The return value is of type Varchar.
- Extract query part information from the url field value.
- Retrieve and analyze statements
- Retrieve and analyze results
-