本文介绍了如何从查询中访问查询编辑器中选择的时间范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好, 是否可以从查询中访问查询编辑器中选择的时间范围? 背景:我不想在查询本身中定义时间范围,而是希望它可以从查询编辑器中选择。但是,我查询的部分内容取决于所选的时间戳,例如当按时间戳进行汇总时(例如,当选择的时间范围 请参阅Twitter上的问题: https://twitter.com/tknerr_de/status/1093812068980084737 我已经发现`bin_auto(timestamp)`看起来很有希望,但是我仍然需要明确地设置query_bin_auto_size = 1m`(即再次将查询中的bin大小硬编码为固定值,这完全不是我想要的。) 如何在查询编辑器UI中根据选定的时间范围动态计算bin大小? 干杯,$ Torben 解决方案 Hi everybody,is it possible to access the time range selected in the query editor from within the query?Background: I don't want to define the time range in the query itself, but rather want it to be selectable from the query editor. However, parts of my query are dependent on the selected timestamp, such as the bin size when summarizing binned by timestamp (e.g. when selected time range is < 1h I want bins of 1m granularity, if it's 1d I want bins of 15m granularity, etc) See also my question on twitter here:https://twitter.com/tknerr_de/status/1093812068980084737I already found `bin_auto(timestamp)` which looked promising, however I still need to explicitly `set query_bin_auto_size=1m` (i.e. again hardcode the bin size in the query to a fixed value, which is exactly not what I want).Any ideas how to compute the bin size dynamically based selected time range in query editor UI?Cheers,Torben 解决方案 这篇关于如何从查询中访问查询编辑器中选择的时间范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-27 15:14
查看更多