Merge branch 'master' into beta-6

pull/801/head
Scott Anderson 2020-03-06 14:03:14 -07:00
commit c8619ba65d
33 changed files with 785 additions and 36 deletions

View File

@ -31,14 +31,14 @@ to create a bucket.
Use the [`influx bucket create` command](/v2.0/reference/cli/influx/bucket/create)
to create a new bucket. A bucket requires the following:
- A name
- The name or ID of the organization the bucket belongs to
- A retention period in nanoseconds
- bucket name
- organization name or ID
- retention period duration (`ns`, `us`, `ms`, `s`, or `h`)
```sh
# Syntax
influx bucket create -n <bucket-name> -o <org-name> -r <retention period in nanoseconds>
influx bucket create -n <bucket-name> -o <org-name> -r <retention-period-duration>
# Example
influx bucket create -n my-bucket -o my-org -r 604800000000000
influx bucket create -n my-bucket -o my-org -r 72h
```

View File

@ -16,12 +16,12 @@ influx bucket create [flags]
```
## Flags
| Flag | Description | Input type | {{< cli/mapped >}} |
|:---- |:----------- |:----------: |:------------------ |
| `-h`, `--help` | Help for the `create` command | | |
| `-n`, `--name` | Bucket name | string | `INFLUX_BUCKET_NAME` |
| `-o`, `--org` | Organization name | string | `INFLUX_ORG` |
| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` |
| `-r`, `--retention` | Duration in nanoseconds bucket will retain data | duration | |
| Flag | Description | Input type | {{< cli/mapped >}} |
|:---- |:----------- |:----------: |:------------------ |
| `-h`, `--help` | Help for the `create` command | | |
| `-n`, `--name` | Bucket name | string | `INFLUX_BUCKET_NAME` |
| `-o`, `--org` | Organization name | string | `INFLUX_ORG` |
| `--org-id` | Organization ID | string | `INFLUX_ORG_ID` |
| `-r`, `--retention` | Duration bucket will retain data | duration | |
{{% cli/influx-global-flags %}}

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: experimental.addDuration
parent: Experimental
weight: 201
weight: 302
related:
- /v2.0/reference/flux/stdlib/experimental/subduration/
---

View File

@ -8,7 +8,7 @@ menu:
v2_0_ref:
name: Aggregate
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [package]
---

View File

@ -8,7 +8,7 @@ menu:
v2_0_ref:
name: Bigtable
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [functions, bigtable, package, google]
---

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: bigtable.from
parent: Bigtable
weight: 301
weight: 401
---
The `bigtable.from()` function retrieves data from a [Google Cloud Bigtable](https://cloud.google.com/bigtable/)

View File

@ -0,0 +1,124 @@
---
title: Flux Geo package
list_title: Geo package
description: >
The Flux Geo package provides tools for working with geo-temporal data,
such as filtering and grouping by geographic location.
Import the `experimental/geo` package.
menu:
v2_0_ref:
name: Geo
parent: Experimental
weight: 301
v2.0/tags: [functions, package, geo]
---
The Flux Geo package provides tools for working with geo-temporal data,
such as filtering and grouping by geographic location.
Import the `experimental/geo` package:
```js
import "experimental/geo"
```
{{< children type="functions" show="pages" >}}
## Geo schema requirements
The Geo package uses the Go implementation of the [S2 Geometry Library](https://s2geometry.io/).
Functions in the Geo package require the following:
- a **`s2_cell_id` tag** containing an **S2 cell ID as a token** (more information [below](#s2-cell-ids))
- a **`lat` field** containing the **latitude in decimal degrees** (WGS 84)
- a **`lon` field** containing the **longitude in decimal degrees** (WGS 84)
#### Schema recommendations
- a tag that identifies the data source
- a tag that identifies the point type (for example: `start`, `stop`, `via`)
- a field that identifies the track or route (for example: `id`, `tid`)
##### Examples of geo-temporal line protocol
```
taxi,pt=start,s2_cell_id=89c2594 tip=3.75,dist=14.3,lat=40.744614,lon=-73.979424,tid=1572566401123234345i 1572566401947779410
bike,id=biker-007,pt=via,s2_cell_id=89c25dc lat=40.753944,lon=-73.992035,tid=1572588100i 1572567115
```
## S2 Cell IDs
Use **latitude** and **longitude** with the `s2.CellID.ToToken` endpoint of the S2
Geometry Library to generate `s2_cell_id` tags.
Specify your [S2 Cell ID level](https://s2geometry.io/resources/s2cell_statistics.html).
{{% note %}}
For faster filtering, use higher S2 Cell ID levels.
But know that that higher levels increase
[series cardinality](/v2.0/reference/glossary/#series-cardinality).
{{% /note %}}
Language-specific implementations of the S2 Geometry Library provide methods for
generating S2 Cell ID tokens. For example:
- **Go:** [`s2.CellID.ToToken()`](https://godoc.org/github.com/golang/geo/s2#CellID.ToToken)
- **Python:** [`s2sphere.CellId.to_token()`](https://s2sphere.readthedocs.io/en/latest/api.html#s2sphere.CellId)
- **Javascript:** [`s2.cellid.toToken()`](https://github.com/mapbox/node-s2/blob/master/API.md#cellidtotoken---string)
## Region definitions
Many functions in the Geo package filter data based on geographic region.
Define geographic regions using the following shapes:
- [box](#box)
- [circle](#circle)
- [polygon](#polygon)
### box
Define a box-shaped region by specifying an object containing the following properties:
- **minLat:** minimum latitude in decimal degrees (WGS 84) _(Float)_
- **maxLat:** maximum latitude in decimal degrees (WGS 84) _(Float)_
- **minLon:** minimum longitude in decimal degrees (WGS 84) _(Float)_
- **maxLon:** maximum longitude in decimal degrees (WGS 84) _(Float)_
##### Example box-shaped region
```js
{
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
```
### circle
Define a circular region by specifying an object containing the following properties:
- **lat**: latitude of the circle center in decimal degrees (WGS 84) _(Float)_
- **lon**: longitude of the circle center in decimal degrees (WGS 84) _(Float)_
- **radius**: radius of the circle in kilometers (km) _(Float)_
##### Example circular region
```js
{
lat: 40.69335938,
lon: -73.30078125,
radius: 20.0
}
```
### polygon
Define a custom polygon region using an object containing the following properties:
- **points**: points that define the custom polygon _(Array of objects)_
Define each point with an object containing the following properties:
- **lat**: latitude in decimal degrees (WGS 84) _(Float)_
- **lon**: longitude in decimal degrees (WGS 84) _(Float)_
##### Example polygonal region
```js
{
points: [
{lat: 40.671659, lon: -73.936631},
{lat: 40.706543, lon: -73.749177},
{lat: 40.791333, lon: -73.880327}
]
}
```

View File

@ -0,0 +1,68 @@
---
title: geo.asTracks() function
description: >
The geo.asTracks() function groups rows into tracks (sequential, related data points).
menu:
v2_0_ref:
name: geo.asTracks
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
---
The `geo.asTracks()` function groups rows into tracks (sequential, related data points).
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.asTracks(
groupBy: ["id","tid"],
orderBy: ["_time"]
)
```
## Parameters
### groupBy
Columns to group by.
These columns should uniquely identify each track.
Default is `["id","tid"]`.
_**Data type:** Array of strings_
### orderBy
Column to order results by.
Default is `["_time"]`
_**Data type:** Array of strings_
## Examples
##### Group tracks in a box-shaped region
```js
import "experimental/geo"
region = {
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.gridFilter(region: region)
|> geo.toRows(correlationKey: ["_time", "id"])
|> geo.asTracks()
```
## Function definition
```js
asTracks = (tables=<-, groupBy=["id","tid"], orderBy=["_time"]) =>
tables
|> group(columns: groupBy)
|> sort(columns: orderBy)
```

View File

@ -0,0 +1,183 @@
---
title: geo.filterRows() function
description: >
The geo.filterRows() function filters data by a specified geographic region with
the option of strict filtering.
menu:
v2_0_ref:
name: geo.filterRows
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
related:
- /v2.0/reference/flux/stdlib/experimental/geo/gridfilter/
- /v2.0/reference/flux/stdlib/experimental/geo/strictfilter/
---
The `geo.filterRows()` function filters data by a specified geographic region with
the option of strict filtering.
This function is a combination of [`geo.gridFilter()`](/v2.0/reference/flux/stdlib/experimental/geo/gridfilter/)
and [`geo.strictFilter()`](/v2.0/reference/flux/stdlib/experimental/geo/strictfilter/).
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.filterRows(
region: {lat: 40.69335938, lon: -73.30078125, radius: 20.0}
minSize: 24,
maxSize: -1,
level: -1,
s2cellIDLevel: -1,
correlationKey: ["_time"],
strict: true
)
```
## Parameters
### region
The region containing the desired data points.
Specify object properties for the shape.
_See [Region definitions](/v2.0/reference/flux/stdlib/experimental/geo/#region-definitions)._
_**Data type:** Object_
### minSize
Minimum number of cells that cover the specified region.
Default is `24`.
_**Data type:** Integer_
### maxSize
Maximum number of cells that cover the specified region.
Default is `-1`.
_**Data type:** Integer_
### level
[S2 cell level](https://s2geometry.io/resources/s2cell_statistics.html) of grid cells.
Default is `-1`.
_**Data type:** Integer_
{{% warn %}}
`level` is mutually exclusive with `minSize` and `maxSize` and must be less than
or equal to `s2cellIDLevel`.
{{% /warn %}}
### s2cellIDLevel
[S2 Cell level](https://s2geometry.io/resources/s2cell_statistics.html) used in `s2_cell_id` tag.
Default is `-1`.
_**Data type:** Integer_
{{% note %}}
When set to `-1`, `geo.filterRows()` attempts to automatically detect the S2 Cell ID level.
{{% /note %}}
### correlationKey
List of columns used to uniquely identify a row for output.
Default is `["_time"]`.
_**Data type:** Array of strings_
### strict
Enable strict geographic data filtering which filters points by longitude (`lon`) and latitude (`lat`).
For S2 grid cells that are partially covered by the defined region, only points
with coordinates in the defined region are returned.
Default is `true`.
_**Data type:** Boolean_
## Examples
##### Strictly filter data in a box-shaped region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.filterRows(
region: {
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
)
```
##### Approximately filter data in a circular region
The following example returns points with coordinates located in S2 grid cells partially
covered by the defined region even though some points my be located outside of the region.
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.filterRows(
region: {
lat: 40.69335938,
lon: -73.30078125,
radius: 20.0
}
strict: false
)
```
##### Filter data in a polygonal region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.filterRows(
region: {
points: [
{lat: 40.671659, lon: -73.936631},
{lat: 40.706543, lon: -73.749177},
{lat: 40.791333, lon: -73.880327}
]
}
)
```
## Function definition
{{% truncate %}}
```js
filterRows = (
tables=<-,
region,
minSize=24,
maxSize=-1,
level=-1,
s2cellIDLevel=-1,
correlationKey=["_time"],
strict=true
) => {
_rows =
tables
|> gridFilter(
region,
minSize: minSize,
maxSize: maxSize,
level: level,
s2cellIDLevel: s2cellIDLevel
)
|> toRows(correlationKey)
_result =
if strict then
_rows
|> strictFilter(region)
else
_rows
return _result
}
```
{{% /truncate %}}

View File

@ -0,0 +1,134 @@
---
title: geo.gridFilter() function
description: >
The geo.gridFilter() function filters data by a specified geographic region.
menu:
v2_0_ref:
name: geo.gridFilter
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
related:
- /v2.0/reference/flux/stdlib/experimental/geo/strictfilter/
- /v2.0/reference/flux/stdlib/experimental/geo/filterRows/
---
The `geo.gridFilter()` function filters data by a specified geographic region.
It compares input data to a set of S2 Cell ID tokens located in the specified [region](#region).
{{% note %}}
S2 Grid cells may not perfectly align with the defined region, so results may include
data with coordinates outside the region, but inside S2 grid cells partially covered by the region.
Use [`toRows()`](/v2.0/reference/flux/stdlib/experimental/geo/toRows/) and
[`geo.strictFilter()`](/v2.0/reference/flux/stdlib/experimental/geo/strictfilter/)
after `geo.gridFilter()` to precisely filter points.
{{% /note %}}
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.gridFilter(
region: {lat: 40.69335938, lon: -73.30078125, radius: 20.0}
minSize: 24,
maxSize: -1,
level: -1,
s2cellIDLevel: -1
)
```
## Parameters
### region
The region containing the desired data points.
Specify object properties for the shape.
_See [Region definitions](/v2.0/reference/flux/stdlib/experimental/geo/#region-definitions)._
_**Data type:** Object_
### minSize
Minimum number of cells that cover the specified region.
Default is `24`.
_**Data type:** Integer_
### maxSize
Maximum number of cells that cover the specified region.
Default is `-1`.
_**Data type:** Integer_
### level
[S2 cell level](https://s2geometry.io/resources/s2cell_statistics.html) of grid cells.
Default is `-1`.
_**Data type:** Integer_
{{% warn %}}
`level` is mutually exclusive with `minSize` and `maxSize` and must be less than
or equal to `s2cellIDLevel`.
{{% /warn %}}
### s2cellIDLevel
[S2 Cell level](https://s2geometry.io/resources/s2cell_statistics.html) used in `s2_cell_id` tag.
Default is `-1`.
_**Data type:** Integer_
{{% note %}}
When set to `-1`, `gridFilter()` attempts to automatically detect the S2 Cell ID level.
{{% /note %}}
## Examples
##### Filter data in a box-shaped region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.gridFilter(
region: {
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
)
```
##### Filter data in a circular region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.gridFilter(
region: {
lat: 40.69335938,
lon: -73.30078125,
radius: 20.0
}
)
```
##### Filter data in a custom polygon region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.gridFilter(
region: {
points: [
{lat: 40.671659, lon: -73.936631},
{lat: 40.706543, lon: -73.749177},
{lat: 40.791333, lon: -73.880327}
]
}
)
```

View File

@ -0,0 +1,70 @@
---
title: geo.groupByArea() function
description: >
The geo.groupByArea() function groups rows by geographic area.
menu:
v2_0_ref:
name: geo.groupByArea
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
---
The `geo.groupByArea()` function groups rows by geographic area.
Area sizes are determined by the specified [`level`](#level).
Each geographic area is assigned a unique identifier which is stored in the [`newColumn`](#newcolumn).
Results are grouped by `newColumn`.
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.groupByArea(
newColumn: "geoArea",
level: 3,
s2cellIDLevel: -1
)
```
## Parameters
### newColumn
Name of the new column that stores the unique identifier for a geographic area.
_**Data type:** String_
### level
[S2 Cell level](https://s2geometry.io/resources/s2cell_statistics.html) used
to determine the size of each geographic area.
_**Data type:** Integer_
### s2cellIDLevel
[S2 Cell level](https://s2geometry.io/resources/s2cell_statistics.html) used in `s2_cell_id` tag.
Default is `-1`.
_**Data type:** Integer_
{{% note %}}
When set to `-1`, `geo.groupByArea()` attempts to automatically detect the S2 Cell ID level.
{{% /note %}}
## Examples
```js
import "experimental/geo"
region = {
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.gridFilter(region: region)
|> geo.toRows()
|> geo.groupByArea(newColumn: "geoArea", level: 3)
```

View File

@ -0,0 +1,100 @@
---
title: geo.strictFilter() function
description: >
The geo.strictFilter() function filters data by latitude and longitude.
menu:
v2_0_ref:
name: geo.strictFilter
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
related:
- /v2.0/reference/flux/stdlib/experimental/geo/gridfilter/
- /v2.0/reference/flux/stdlib/experimental/geo/filterRows/
- /v2.0/reference/flux/stdlib/experimental/geo/toRows/
---
The `geo.strictFilter()` function filters data by latitude and longitude in a specified region.
This filter is more strict than [`geo.gridFilter()`](/v2.0/reference/flux/stdlib/experimental/geo/gridfilter/),
but for the best performance, use `geo.strictFilter()` **after** `geo.gridFilter()`.
{{% note %}}
`geo.strictFilter()` requires `lat` and `lon` columns in each row.
Use [`geo.toRows()`](/v2.0/reference/flux/stdlib/experimental/geo/gridfilter/)
to pivot `lat` and `lon` fields into each row **before** using `geo.strictFilter()`.
{{% /note %}}
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.strictFilter(
region: {lat: 40.69335938, lon: -73.30078125, radius: 20.0}
)
```
## Parameters
### region
The region containing the desired data points.
Specify object properties for the shape.
_See [Region definitions](/v2.0/reference/flux/stdlib/experimental/geo/#region-definitions)._
_**Data type:** Object_
## Examples
##### Filter data in a box-shaped region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.toRows()
|> geo.strictFilter(
region: {
minLat: 40.51757813,
maxLat: 40.86914063,
minLon: -73.65234375,
maxLon: -72.94921875
}
)
```
##### Filter data in a circular region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.toRows()
|> geo.strictFilter(
region: {
lat: 40.69335938,
lon: -73.30078125,
radius: 20.0
}
)
```
##### Filter data in a custom polygon region
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.toRows()
|> geo.strictFilter(
region: {
points: [
{lat: 40.671659, lon: -73.936631},
{lat: 40.706543, lon: -73.749177},
{lat: 40.791333, lon: -73.880327}
]
}
)
```

View File

@ -0,0 +1,56 @@
---
title: geo.toRows() function
description: >
The geo.toRows() function ...
menu:
v2_0_ref:
name: geo.toRows
parent: Geo
weight: 401
v2.0/tags: [functions, geo]
related:
- /v2.0/reference/flux/stdlib/built-in/transformations/pivot/
---
The `geo.toRows()` function pivots data into row-wise sets base on time or other correlation columns.
For geo-temporal datasets, output rows include `lat` and `lon` columns required by
many Geo package functions.
_**Function type:** Transformation_
```js
import "experimental/geo"
geo.toRows(
correlationKey: ["_time"]
)
```
## Parameters
### correlationKey
List of columns used to uniquely identify a row for output.
Default is `["_time"]`.
_**Data type:** Array of strings_
## Examples
```js
import "experimental/geo"
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "example-measurement")
|> geo.toRows()
```
## Function definition
```js
toRows = (tables=<-, correlationKey=["_time"]) =>
tables
|> pivot(
rowKey: correlationKey,
columnKey: ["_field"],
valueColumn: "_value"
)
```

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: experimental.group
parent: Experimental
weight: 201
weight: 302
related:
- /v2.0/reference/flux/stdlib/built-in/transformations/group/
---

View File

@ -10,7 +10,7 @@ menu:
name: HTTP
identifier: HTTP-exp
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [functions, http, package]
---

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: http.get
parent: HTTP-exp
weight: 301
weight: 401
---
The `http.get()` function submits an HTTP GET request to the specified URL and

View File

@ -8,7 +8,7 @@ menu:
v2_0_ref:
name: MQTT
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [functions, mqtt, package]
---

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: mqtt.to
parent: MQTT
weight: 301
weight: 401
---
The `mqtt.to()` function outputs data to an MQTT broker using MQTT protocol.

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: experimental.objectKeys
parent: Experimental
weight: 201
weight: 302
---
The `experimental.objectKeys()` function returns an array of keys in a specified object.

View File

@ -8,7 +8,7 @@ menu:
v2_0_ref:
name: Prometheus
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [functions, prometheus, package]
---

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: prometheus.histogramQuantile
parent: Prometheus
weight: 301
weight: 401
---
The `prometheus.histogramQuantile()` function calculates quantiles on a set of values

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: prometheus.scrape
parent: Prometheus
weight: 301
weight: 401
related:
- /v2.0/write-data/scrape-data/scrapable-endpoints/
---

View File

@ -8,7 +8,7 @@ menu:
v2_0_ref:
name: Query
parent: Experimental
weight: 201
weight: 301
v2.0/tags: [package]
---

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: query.filterFields
parent: Query
weight: 301
weight: 401
---
The `query.filterFields()` function filters input data by field.

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: query.filterMeasurement
parent: Query
weight: 301
weight: 401
---
The `query.filterMeasurement()` function filters input data by measurement.

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: query.fromRange
parent: Query
weight: 301
weight: 401
---
The `query.fromRange()` function returns all data from a specified bucket within

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: query.inBucket
parent: Query
weight: 301
weight: 401
---
The `query.inBucket()` function queries data from a specified bucket within given

View File

@ -6,7 +6,7 @@ menu:
v2_0_ref:
name: experimental.set
parent: Experimental
weight: 201
weight: 302
related:
- /v2.0/reference/flux/stdlib/built-in/transformations/set/
---

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: experimental.subDuration
parent: Experimental
weight: 201
weight: 302
related:
- /v2.0/reference/flux/stdlib/experimental/addduration/
---

View File

@ -7,7 +7,7 @@ menu:
v2_0_ref:
name: experimental.to
parent: Experimental
weight: 201
weight: 302
related:
- /v2.0/reference/flux/stdlib/built-in/outputs/to/
---

View File

@ -16,6 +16,14 @@ Though newer versions of Flux may be available, they will not be included with
InfluxDB until the next InfluxDB v2.0 release._
{{% /note %}}
## v0.63.0 [2020-03-03]
### Features
- Experimental `geo` package.
- Initial grammar for Flux and a partial grammar for InfluxQL.
---
## v0.62.0 [2020-02-28]
### Features

View File

@ -94,9 +94,15 @@ The default time range is 5m.
Click **Query Builder** to use the builder to create a Flux query. Click **Script Editor** to manually edit the query.
#### Add comments to your script
#### Keyboard shortcuts
In **Script Editor** mode, press `Control+/` to toggle between commenting a line out.
In **Script Editor** mode, the following keyboard shortcuts are available:
| Key | Description |
|--------------------------------|---------------------------------------------|
| `Control + /` (`⌘ + /` on Mac) | Comment/uncomment current or selected lines |
| `Control + Enter` | Submit query |
## Save your query as a dashboard cell or task

View File

@ -6,7 +6,7 @@
{{ else if (eq $show "sections") }}
{{ .Scratch.Set "pages" .Page.Sections }}
{{ else if (eq $show "pages") }}
{{ .Scratch.Set "pages" .Page.Pages }}
{{ .Scratch.Set "pages" .Page.RegularPages }}
{{ end }}
{{ $pages := .Scratch.Get "pages" }}