Forum Discussion
Kok San Lee
Aug 30, 2017Copper Contributor
Existing queries in Application Insights don't work in OMS
I'm trying out the Application Insights Connector in OMS and noticed that queries that worked in the Application Insights Analytics searches don't seem to work in OMS. These queries involve summarizi...
Kok San Lee
Sep 03, 2017Copper Contributor
Hi,
For example, let custom event be:
track_event('test_drive', {"brand": "foo", "make": "bar"})Somthing I do in Application Insights is a query like such:
customEvents | where name == 'test_drive' | summarize by count() by tostring(customDimensions.brand)
where I do a count of a specific custom event summarized over a field I created for that event.
Noa Kuperberg
Microsoft
Sep 04, 2017There are several ways, here are examples for parse and extract:
parse ('"firstname": "John", "lastname": "Doe"')
with '"firstname": "' firstname '", "lastname": "' lastname '"'
| project firstname, lastname
...| extend custom_value='"firstname": "John", "lastname": "Doe"'
| extend names = extractall('"firstname": "(.*)", "lastname": "(.*)"', custom_value)
| project custom_value, firstname=names[0][0], lastname=names[0][1]
over these you eventually summarize as you prefer.
- Ketan GhelaniSep 10, 2017Former Employee
Just to give you some history. App Insights Connector was created when OMS didn't support json so we had to transform these. In the near future, the need for connector will go away and you should be able to query data directly for e.g. app('foo').events | take 100.