Request URL classification function

Updated at: 2024-09-03 05:18

The request URL classification function classifies a request URL and attaches a tag to the URL. The function also provides the regular expression that defines the pattern of the tag. You can search for URLs by using the tag pattern and then pass the search result to extract, transform, and load (ETL) processes.

Note
The request URL classification function is available in the China (Beijing) and China (Shanghai) regions.
  • Function syntax
    select url_classify(url_path varchar);
    select url_classify(url_path varchar, weight long);
  • Input parameters
    ParameterDescription
    ParameterDescription
    url_pathThe URL of the request.
    weightThe number of times that the request URL is called.
  • Output parameters
    ParameterDescription
    ParameterDescription
    url_pathThe URL of the request.
    api_pathThe API endpoint that corresponds to the request URL. The API endpoint is returned by a predefined function.
    regex_tplThe regular expression that is returned by a predefined algorithm.
  • Response
         url_path                          |     api_path                             |         regex_tpl
    -------------------------------------+------------------------------+-------------------------------------
     /gl/balance/666398186799140           | /gl/balance/*                             | \/gl\/balance\/[0-9].+
     /gl/glaccount/30579281472076          | /gl/glaccount/*                         | \/gl\/glaccount\/[0-9].+
     /gl/balance/709016207098025           | /gl/balance/*                            | \/gl\/balance\/[0-9]. +
  • Example
    • Enter the following query statement:
      * | select url_classify(uri, num) from (select uri, COUNT(*) as num from log group by uri limit 1000)
    • View the query result.Request URL classification function
    Feedback
    phone Contact Us

    Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

    alicare alicarealicarealicare