azure - “where”运算符:无法解析名为“timeOffsetMin”的标量表达式
问题描述
我现在转向 Azure、KQL 和 Log Analytics。我正在尝试在我的品尝 Log Analytics 工作区上运行以下查询,但我遇到了这个错误,我无法绕过它。
错误:
'where' operator: failed to resolve scalar expression named 'timeOffsetMin'
询问:
let timeOffsetMin = 7d;
let timeOffsetMax = timeOffsetMin * 2;
AuditLogs | where TimeGenerated > ago(timeOffsetMin) and TimeGenerated < ago(timeOffsetMax);
谢谢您的帮助。
解决方案
在运行之前突出显示整个查询(在编辑器中)并重新格式化代码解决了我的问题。
询问:
let timeOffsetMin = 7d;
let timeOffsetMax = timeOffsetMin * 2;
AuditLogs
| where TimeGenerated > ago(timeOffsetMin) and TimeGenerated < ago(timeOffsetMax);
推荐阅读
- cassandra - cassandra 中的复制因子和后来的变化
- sql - 使用滞后计算行之间的差异
- automated-tests - 从网页中读取 li 元素并将其存储在 OpenTest 中的数组中以检查重复项
- flutter - 如何像这样显示下一张卡片并在屏幕上只显示一张卡片?(附上 UI 截图)
- c++ - 使用 AVX 对两个 zmm(512 位)寄存器进行异或运算
- javascript - jquery 在 chrome、mozilla 和 IE 中工作,但不能在 safari 中工作
- mysql - MySQL 递归 CTE 表不存在
- c# - 在 C# 中使用 RemoteCertificateValidationCallback 进行 x509Certificate 吊销检查
- python - 离散数据的质量
- python - 从图中获取热图注释字典