1.6 KiB
1.6 KiB
title | description | menu | weight | flux/v0/tags | introduced | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
iox.sql() function | `iox.sql()` executes an SQL query against a bucket in an IOx storage node. |
|
201 |
|
0.186.0 |
iox.sql()
executes an SQL query against a bucket in an IOx storage node.
This function creates a source that reads data from IOx.
Function type signature
(bucket: string, query: string) => stream[A] where A: Record
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
bucket
({{< req >}}) IOx bucket to read data from.
query
({{< req >}}) SQL query to execute.
Examples
Use SQL to query data from IOx
import "experimental/iox"
iox.sql(bucket: "example-bucket", query: "SELECT * FROM measurement")