My query must extract a query string parameter from a URL in a data column. Unfortunately, Kusto appears bugged in that the base URL is considered part of the first parameter's name as indicated in this example:
datatable (MyUrl:string)
[
"http://foo/?p1=bar&p2=baz",
"http://foo/?p1=bar&p2=quuz",
"http://roo/?p1=biz&p2=fizz"
]
| project parse_urlquery(MyUrl)["Query Parameters"]["http://foo/?p1"], parse_urlquery(MyUrl)["Query Parameters"]["p1"], parse_urlquery(MyUrl)["Query Parameters"]["p2"]
How can I reliably extract p1 (Note, it's not necessarily first in the actual URL).
did you perhaps intend to use
parse_url()
and notparse_urlquery()
?