Merge branch 'master' of github.com:influxdata/docs-v2

pull/1734/head
Scott Anderson 2020-10-28 09:54:00 -06:00
commit 206df67edb
2 changed files with 4 additions and 3 deletions

View File

@ -19,13 +19,12 @@ The following examples identify and count unique locations that data was collect
## Find unique values
This query:
- Uses [`group()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/group/) to ungroup data and return results in a single table.
- Uses [`keep()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/keep/) and [`unique()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/selectors/unique/) to return unique values in the specified column.
```js
import "experimental/csv"
csv.from(bucket: "noaa")
from(bucket: "noaa")
|> group()
|> keep(columns: ["location"])
|> unique(column: "location")
@ -40,6 +39,7 @@ csv.from(bucket: "noaa")
## Count unique values
This query:
- Uses [`group()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/group/) to ungroup data and return results in a single table.
- Uses [`keep()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/keep/), [`unique()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/selectors/unique/), and then [`count()`](/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/count/) to count the number of unique values.

View File

@ -32,4 +32,5 @@ Back up all data before upgrading with `influx upgrade`.
```sh
influxd upgrade --config <path to config file>
```
<!-- -->
4. Follow the prompts to set up a new InfluxDB 2.0 instance.