Pio*_*mba 2 azure-application-insights ms-app-analytics
我有一个应用程序洞察查询。在这个查询中,我想将几列加入/组合成一列,以显示如何实现这一点。
我想结合ip,城市,州,国家。
customEvents
| where timestamp >= ago(7d)
| where (itemType == 'customEvent')
| where name == "Signin"
| project timestamp, customDimensions.appusername, client_IP,client_City,client_StateOrProvince, client_CountryOrRegion
| order by timestamp desc
Run Code Online (Sandbox Code Playgroud)
strcat 是你的朋友,用你想要的任何字符串作为分隔符(我只是在示例中使用空格):
| project timestamp, customDimensions.appusername,
strcat(client_IP," ",client_City," ",client_StateOrProvince," ", client_CountryOrRegion)
Run Code Online (Sandbox Code Playgroud)
此外,| where (itemType == 'customEvent')您的查询中的 是不必要的,因为customEvents表中的所有内容都已经是customEvent. itemType如果您以某种方式加入多个表,则只需要这样的过滤器(例如union requests, customEvents或join查询中引用多个表的某处)
| 归档时间: |
|
| 查看次数: |
2071 次 |
| 最近记录: |