docs-v2/content/influxdb/v2.0/query-data/flux/_index.md

40 lines
939 B
Markdown
Raw Normal View History

2020-02-24 22:21:03 +00:00
---
2020-03-06 15:40:37 +00:00
title: Query data with Flux
description: Guides that walk through both common and complex queries and use cases for Flux.
weight: 102
influxdb/v2.0/tags: [flux, query]
2020-02-24 22:21:03 +00:00
menu:
influxdb_2_0:
2020-03-06 15:40:37 +00:00
name: Query with Flux
2020-02-24 22:21:03 +00:00
parent: Query data
2020-03-06 15:40:37 +00:00
alias:
- /v2.0/query-data/guides/
- /v2.0/query-data/flux/
2020-02-24 22:21:03 +00:00
---
2020-02-25 16:43:08 +00:00
2020-03-06 15:40:37 +00:00
The following guides walk through both common and complex queries and use cases for Flux.
2020-02-25 16:43:08 +00:00
{{% note %}}
#### Example data variable
Many of the examples provided in the following guides use a `data` variable,
2020-03-05 22:11:42 +00:00
which represents a basic query that filters data by measurement and field.
`data` is defined as:
2020-02-25 16:43:08 +00:00
```js
data = from(bucket: "example-bucket")
2020-02-25 16:43:08 +00:00
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "example-measurement" and
r._field == "example-field"
2020-02-25 16:43:08 +00:00
)
```
{{% /note %}}
2020-02-25 16:43:08 +00:00
2020-03-06 15:40:37 +00:00
## Flux query guides
2020-02-25 16:43:08 +00:00
{{< children type="anchored-list" pages="all" >}}
---
2020-02-25 16:43:08 +00:00
{{< children pages="all" readmore=true hr=true >}}