Home > OS >  Get a category name from the id in the url using kusto query
Get a category name from the id in the url using kusto query

Time:10-11

I need to get the category name from category id using kusto query.

First i have got the most searched url from the website using the below kusto query and ran it in app insights logs

Requests
| where resultCode==200
| where url contains "bCatID" 
| summarize count=sum(itemCount) by url
| sort by count
| take 1

From the above query i got the result like
https://www.test.com/item.aspx?idItem=123456789&bCatID=1282

So for corresponding categoryid=1282 i need to get the category name using kusto

CodePudding user response:

you can use the enter image description here

CodePudding user response:

parse_urlquery

print url ="https://www.test.com/item.aspx?idItem=123456789&bCatID=1282"
| extend parse_urlquery(url)["Query Parameters"]["bCatID"]
url Query Parameters_bCatID
https://www.test.com/item.aspx?idItem=123456789&bCatID=1282 1282

Fiddle

  • Related