是否有一种方法可以在Kusto.Explorer中存储通用查询语句以供以后使用。例如:
我的大多数查询都从以下几个方面开始:
set notruncation;
set maxmemoryconsumptionperiterator=68719476736;
set servertimeout = timespan(15m);
我想使用一个“变量名”来引用它们,而不是每次都显式地调用它们。就像这样:
Setlimitations
T
| summarize count() by Key
我是一名C程序员,是Kusto的新手。我正在运行Kusto查询,它给出了对唯一id号进行直接搜索的结果。如何运行id号码列表查询。在C中,我会对list数组中的项目范围使用for循环,但我不知道如何在Kusto中转换该逻辑。 查询: let startdate = ago(5d); let enddate = ago(1m);
DataBase
| where messageType != "Beacon"
| where timestamp between (startdate..enddate)
| where uniqueId == "26ca68
我在下面编写了两个查询,以便从表中提取不同的计数/记录。然而,它们给了我不同的结果。
第一个查询比第二个查询返回更多的记录。
问题1:
.ReachOptimization_L0
| where CurrentSubscriptionStatus == "ACTIVE"| where SnapshotDate =="2019-11-29"| where IsOptIn==1| where CampaignName != "" or CampaignId != ""| where ReachedFlag== 1| summariz
Azure数据资源管理器据称是
Kusto.Explorer工具支持对Kusto的tool查询。若要指示Kusto.Explorer执行查询,请以空的T注释行(--)开始查询。
但是,我不能让它在中工作。
例如,这个Kusto查询工作良好,并返回结果:
ContainerInstanceLog_CL
| where Message has "Hamlet"
| limit 500
但是任何使用to的尝试(带一个空的注释行).
--
SELECT * FROM ContainerInstanceLog_CL
...fails与
Query could not be par
我正在尝试转换从运行Kusto查询(在其中检索表的架构)中收到的响应。我的Kusto查询如下:
tableName | getschema
这种查询的响应,如Kusto中所示,如下所示(不完整)
回到我的C#代码中,我定义了以下类:
public class DatasetColumn
{
/// <summary>
/// Name of the column
/// </summary>
public string? ColumnName { get; set; }
我在Azure上的Kusto中做了一个查询,得到Redis的内存碎片值,这个值是通过将RSS内存除以使用的内存得到的,问题是我无法使用这两个不同的字段进行计算,因为需要过滤"usedmemoryRss“和"usedmemory”字段的"Average“字段的值。当我在扩展行上进行过滤时,查询没有返回值,代码如下所示: AzureMetrics
| extend m1 = Average | where MetricName == "usedmemoryRss" and
| extend m2 = Average | where MetricName
我在Apps中运行了Azure函数应用程序,并且我能够在Metrics中按实例级别获得Http错误的数量(Pls见图)。我想通过Kusto查询获得相同级别的化妆品,并尝试了所有无法找到的日志表。是否有可能通过实例使用Kusto获得这些指标?
我签了AzureMetrics,没有存储任何实例级的数据:下面是用于获取所有Here错误的查询。
AzureMetrics
| where ResourceGroup == "RG"
| where TimeGenerated {TimeRange}
| where ResourceId in ("ResourceId
我需要运行一个非常简单的查询
requests
| where cloud_RoleName == "blabla"
| summarize Count=count() by url
| order by Count desc
如果我尝试这样做的话,我只需要从过去的5分钟中获取数据:
requests | where timestamp < ago(5m)
| where cloud_RoleName == "blabla"
| summarize Count=count() by url
| order by Count desc
或者这个
req
我正在尝试生成一组值列表中缺少的值列表,我有如下查询:
let fcu = todynamic(pack_array("Alarm",
"State",
"Zone",
"Air",
"Temp Sp",
"Fan",
"Zone Air"));
let ac = all
| join kind=inner (AT) on $left.SourceId == $r
我试图在Kusto explorer中从Kusto数据库返回100多万条记录,但我收到以下错误
Query result set has exceeded the internal record count limit 500000 (E_QUERY_RESULT_SET_TOO_LARGE; see http://aka.ms/kustoquerylimits)
我想上限是5000000。有什么想法可以让我做到这一点吗?谢谢
问题
我正在试图获得最低的时间戳(最早)后,“侧”已经改变了票务谈话,看看它是多久以来,第一次回复最新的消息。
示例:
A (10:00) : Hello
A (10:05) : How are you?
B (10:06) : I'm fine, thank you
B (10:08) : How about you?
A (10:10) : I'm fine too, thank you <------
A (10:15) : I have to go now, see you around!
现在我要找的是箭头所指示的消息的时间戳。会话“侧”之后的第一条消息发生了变
我希望在Synapse中声明Pyspark变量,并在Kusto查询中使用该变量。
在Pyspark中声明的变量如下所示
s = "02-01-2022"
print(s)
e = "02-10-2022"
print(e)
希望在Kusto查询中使用变量“s”和“e”,如下所示
%%pyspark
s = "02-01-2022"
print(s)
e = "02-10-2022"
print(e)
# Read data from Azure Data Explorer table(s)
# Full Sample Cod
我有一个昂贵的查询,需要大量的CPU和内存来生成结果。但是,结果数据集只包含有限的行数。
let result = expensive_function()
| summarize A=xxx, B=xxx by X, Y, Z;
我想附加另一行,从结果中进一步总结。例如,省略汇总键中的Z列,并为结果行设置Z="ALL"。
result
| union (
result
| summarize A=XXX, B=XXX by X, Y
| extend Z="ALL"
)
当执行此操作时,Kusto将在union操作符中并行地展开
下面是我的Kusto查询,它使用镜头仪表板中的2+ min来显示数据,我已经优化了我的查询,使其在let语句中使用materialize(),并使用has包含。有没有其他更好的方法来优化它。
let C_masfunteams = materialize(find withsource=source in (cluster(X).database('oci-*').['TextFileLogs']) where AttemptedIngestTime > ago(7d)
and FileLineContent has "<li>