azure - Azure Log Analytics 查询属性是否存在
问题描述
我正在尝试检查我的customDimensions
对象是否具有属性,然后仅计算将属性设置为某物的查询。它正在计算对象中没有该SupportedLanguage
属性的查询customDimensions
。
这是我当前的查询:
customEvents
| where timestamp > ago(7d)
| summarize COUNT=count(customDimensions.SupportedLanguage) by lang=tostring(customDimensions.SupportedLanguage)
| render piechart
我尝试执行以下操作,但没有成功:
customEvents
| where timestamp > ago(7d)
| where customDimensions.SupportedLanguage
| summarize COUNT=count(customDimensions.SupportedLanguage) by lang=tostring(customDimensions.SupportedLanguage)
| render piechart
解决方案
为此,您可以利用isnotempty()函数:
customEvents
| where timestamp > ago(7d)
| where isnotempty(customDimensions.SupportedLanguage)
推荐阅读
- javascript - 使用 node_module 的 Firefox 插件
- flutter - Flutter SelectableText.rich 不适用于 TextSpan
- vba - 根据行中的单元格值向电子邮件地址发送自动电子邮件
- node.js - 如何将 Postgres FIFO 队列限制为仅 POP 一项?
- flutter - 容器在反转 TransformRotate 之前自动旋转
- python - 当字典值未在 for 循环内重置时,列表值被重写
- python - Django 错误:在 get 方法上找不到 404 页面
- laravel - 使用我的 laravel 应用程序中其他站点的用户登录他们的帐户
- bash - 为什么“bash <(wget -qO- https://example.com)”不能与 docker 的 RUN 命令一起使用?但是可以从手动使用的主机或容器中工作吗?
- python - 使用 docker 更改 postgres 端口以进行气流