Azure Log Analytics switch 语句/模式匹配

mic*_*ckl 3 azure azure-application-insights azure-log-analytics

我正在尝试使用 Application Insights Analytics 和 Log Analytics Query Language处理我的Application Insights数据。我想要的是 C# 中的 switch 语句或 F# 中的模式匹配。所以伪代码是这样的:

requests
| where timestamp > now(-1d)
| project endpoint = (switch(name){ {case: "POST /api/jobs/search", then: "Jobs Search"}, {case: "POST /api/offices/search", then: "Office Search"} ...})
Run Code Online (Sandbox Code Playgroud)

或者也许有某种解决方法来定义一个类似字典的结构,然后在我的查询中使用该结构

有任何想法吗 ?