使用 influx query 命令
使用 influx query
命令,使用 Flux 在 InfluxDB 中查询数据。将 Flux 查询作为文件或通过 stdin 传递给命令。
从文件运行查询
influx query --file /path/to/query.flux
通过 stdin 管道传递原始 Flux
influx query - # Return to open the pipe
data = from(bucket: "example-bucket") |> range(start: -10m) # ...
# Linux & macOS: <ctrl-d> to close the pipe and submit the command
# Windows: <enter>, then <ctrl-d>, then <enter> to close the pipe and submit the command
移除大型数据集中的不必要列
当使用 influx query
命令查询和下载大型数据集时,删除诸如 _start
和 _stop
之类的列以优化下载文件大小。
// ...
|> drop(columns: ["_start", "_stop"])
此页面是否对您有帮助?
感谢您的反馈!