当列包含字符串值时,如何从InfluxDB测量中返回特定行



基本上,我正在寻找与SQL中的"相当"关键字。有什么办法可以获取这些行,其中列包含特定的字符串?

例如从表/测量值下面,我们可以获取"数据"包含"查找"的行中的行?即第二行

col1       col2 col3
第一个str stsp; nbsp;  nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;
第一个str  nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp》;
第一个str   nbsp; nbsp; nbsp; nbsp;   nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;

您可以使用=~运算符与正则态度进行比较。例如:

select * from yourmeasure where col3 =~ /find/i

i使情况不敏感。如果您不想要它,请删除此。

最新更新