parse_url
description
Syntax
VARCHAR parse_url(VARCHAR url, VARCHAR name)
From the URL, the field corresponding to name is resolved. The name options are as follows: ‘PROTOCOL’, ‘HOST’, ‘PATH’, ‘REF’, ‘AUTHORITY’, ‘FILE’, ‘USERINFO’, ‘PORT’, ‘QUERY’, and the result is returned.
example
1. mysql> SELECT parse_url ('https://doris.apache.org/', 'HOST');
2. +------------------------------------------------+
3. | parse_url('https://doris.apache.org/', 'HOST') |
4. +------------------------------------------------+
5. | doris.apache.org |
6. +------------------------------------------------+
If you want to get parameter in QUERY, you can use extract_url_parameter.
keywords
1. PARSE URL
