mysql - 将日期表传递给 Kusto 中的范围函数
问题描述
在 Kusto 查询语言中,是否可以将一列日期传递给范围?我正在尝试沿这些日期呈现时间线图表映射 table4 值。todatetime("1598149365")
将工作,但不是 table_dates3。或者,如果有一些类似的方法可以做到这一点。
TableName
| where Name == "abc"
| project table_dates1, table_dates2, table_dates3, table4
| make-series num=count() default=0 on todatetime(table_dates1) in range(todatetime(table_dates2), todatetime(table_dates3), 1h) by table4
| render timechart
解决方案
您应该使用“[from start] [to end] step step”语法而不是旧的 range() 语法。“from”和“to”是可选的,如果未提供,它们将是每个时间序列的最小/最大时间。所以也许是这样的:
TableName
| where Name == "abc"
| project table_dates1, table_dates2, table_dates3, table4
| make-series num=count() on todatetime(table_dates1) step 1h by table4
| render timechart
推荐阅读
- java - Java ZoneId 无法识别美国的哪些短时区 ID?
- c++ - 我的主要功能反汇编中所有这些奇怪的汇编指令是什么?
- typescript - 量角器/打字稿 - 在“mocha-allure-reporter”中找不到名称“allure”
- javascript - React 应用程序显示 props.location.state 未定义
- swift - 在 SwiftUI 中实例化自定义视图时,如何动态声明变量类型然后将其用作参数?
- html - 在 html 中创建一个 4 列网格
- python - 在 Python 中使用多线程方法将数据存储到 BigQuery 中的问题
- php - 检查唯一字符串时何时在文件系统“数据库”上使用 MySQL
- python-2.7 - Beautiful Soup 多个 findAll 类
- python - 在 Python 3.7 Virtual env 下,如何安装只能在 Python 2.7 上运行的程序