azure-application-insights - Azure 应用程序洞察力查询合并行
问题描述
我有以下查询:
traces
| where customDimensions.Category == "Function"
| where isnotempty(customDimensions.prop__recordId) or isnotempty(customDimensions.prop__Entity)
| project operation_Id, Entity = customDimensions.prop__Entity, recordName = customDimensions.prop__recordName, recordId = customDimensions.prop__recordId
解决方案
请尝试使用连接运算符,如下所示:
traces
| where customDimensions.Category == "Function"
| where isnotempty(customDimensions.prop__recordId)
| project operation_Id, customDimensions.prop__recordId
| join kind = inner(
traces
| where customDimensions.Category == "Function"
| where isnotempty(customDimensions.prop__Entity)
| project operation_Id,customDimensions.prop__Entity,customDimensions.prop__recordName
) on operation_Id
| project-away operation_Id1 //remove the redundant column,note that it's operation_Id1
| project operation_Id, Entity = customDimensions.prop__Entity, recordName = customDimensions.prop__recordName, recordId = customDimensions.prop__recordId
我没有相同的数据,但制作了一些类似的数据,在我身边工作得很好。
合并前:
合并后:(注意使用 project-away 删除用作连接键的冗余列,默认情况下它始终具有数字后缀 1)
推荐阅读
- html - 不可见时滚动到底部
- mysql - 无法将 mysql docker 容器与 Spring Boot 应用程序链接 - 通信链接失败
- selenium - 在 Robot Framework 中删除和添加数字的千位分隔符
- r - Scopus api 错误
- php - 使用 PHP 连接到 SOAP Web 服务的标头
- asp.net-core - 浏览器关闭后如何让用户保持登录状态
- c# - OpenQA.Selenium.WebDriverException:无法在 http://localhost:50343/ 上启动驱动程序服务
- c# - 使用接口进行依赖注入,但构造函数需要字符串参数
- java - 卡住解析嵌套的 JSON 数组
- revit-api - 使用 API 注册反应器以触发自定义参数?