commit
9c6d37efd6
|
@ -12,9 +12,7 @@ weight: 204
|
|||
InfluxDB allows you to export tasks from the InfluxDB user interface (UI).
|
||||
Tasks are exported as downloadable JSON files.
|
||||
|
||||
To export a task:
|
||||
|
||||
## Delete a task in the InfluxDB UI
|
||||
## Export a task in the InfluxDB UI
|
||||
1. Click the **Tasks** icon in the left navigation menu.
|
||||
|
||||
{{< nav-icon "tasks" >}}
|
||||
|
|
|
@ -93,7 +93,7 @@ from(bucket: "telegraf/autogen")
|
|||
r._field == "used_percent")
|
||||
|> aggregateWindow(
|
||||
every: 5m,
|
||||
fn: (columns, tables=<-) => tables |> percentile(percentile: 0.99, columns:columns)
|
||||
fn: (columns, tables=<-) => tables |> quantile(q: 0.99, columns:columns)
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
title: median() function
|
||||
description: The `median()` function returns the median `_value` of an input table or all non-null records in the input table with values that fall within the 50th percentile
|
||||
description: >
|
||||
The `median()` function returns the median `_value` of an input table or all non-null records
|
||||
in the input table with values that fall within the `0.5` quantile or 50th percentile.
|
||||
aliases:
|
||||
- /v2.0/reference/flux/functions/transformations/aggregates/median
|
||||
menu:
|
||||
|
@ -10,9 +12,9 @@ menu:
|
|||
weight: 501
|
||||
---
|
||||
|
||||
The `median()` function is a special application of the [`percentile()` function](/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile)
|
||||
The `median()` function is a special application of the [`quantile()` function](/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile)
|
||||
that returns the median `_value` of an input table or all non-null records in the input table
|
||||
with values that fall within the 50th percentile depending on the [method](#method) used.
|
||||
with values that fall within the `0.5` quantile (50th percentile) depending on the [method](#method) used.
|
||||
|
||||
_**Function type:** Selector or Aggregate_
|
||||
_**Output data type:** Object_
|
||||
|
@ -23,15 +25,15 @@ median(method: "estimate_tdigest", compression: 0.0)
|
|||
```
|
||||
|
||||
When using the `estimate_tdigest` or `exact_mean` methods, it outputs non-null
|
||||
records with values that fall within the 50th percentile.
|
||||
records with values that fall within the `0.5` quantile.
|
||||
|
||||
When using the `exact_selector` method, it outputs the non-null record with the
|
||||
value that represents the 50th percentile.
|
||||
value that represents the `0.5` quantile.
|
||||
|
||||
{{% note %}}
|
||||
The `median()` function can only be used with float value types.
|
||||
It is a special application of the [`percentile()` function](/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile) which
|
||||
uses an approximation implementation that requires floats.
|
||||
It is a special application of the [`quantile()` function](/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile)
|
||||
which uses an approximation implementation that requires floats.
|
||||
You can convert your value column to a float column using the [`toFloat()` function](/v2.0/reference/flux/functions/built-in/transformations/type-conversions/tofloat).
|
||||
{{% /note %}}
|
||||
|
||||
|
@ -46,18 +48,18 @@ The available options are:
|
|||
|
||||
##### estimate_tdigest
|
||||
An aggregate method that uses a [t-digest data structure](https://github.com/tdunning/t-digest)
|
||||
to compute an accurate percentile estimate on large data sources.
|
||||
to compute an accurate quantile estimate on large data sources.
|
||||
|
||||
##### exact_mean
|
||||
An aggregate method that takes the average of the two points closest to the percentile value.
|
||||
An aggregate method that takes the average of the two points closest to the quantile value.
|
||||
|
||||
##### exact_selector
|
||||
A selector method that returns the data point for which at least percentile points are less than.
|
||||
A selector method that returns the data point for which at least `q` points are less than.
|
||||
|
||||
### compression
|
||||
Indicates how many centroids to use when compressing the dataset.
|
||||
A larger number produces a more accurate result at the cost of increased memory requirements.
|
||||
Defaults to 1000.
|
||||
Defaults to `1000.0`.
|
||||
|
||||
_**Data type:** Float_
|
||||
|
||||
|
@ -90,8 +92,8 @@ from(bucket: "telegraf/autogen")
|
|||
## Function definition
|
||||
```js
|
||||
median = (method="estimate_tdigest", compression=0.0, tables=<-) =>
|
||||
percentile(
|
||||
percentile:0.5,
|
||||
quantile(
|
||||
q:0.5,
|
||||
method:method,
|
||||
compression:compression
|
||||
)
|
||||
|
|
|
@ -1,47 +1,48 @@
|
|||
---
|
||||
title: percentile() function
|
||||
description: The `percentile()` function outputs non-null records with values that fall within the specified percentile or the non-null record with the value that represents the specified percentile.
|
||||
title: quantile() function
|
||||
description: The `quantile()` function outputs non-null records with values that fall within the specified quantile or the non-null record with the value that represents the specified quantile.
|
||||
aliases:
|
||||
- /v2.0/reference/flux/functions/transformations/aggregates/percentile
|
||||
- /v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: percentile
|
||||
name: quantile
|
||||
parent: built-in-aggregates
|
||||
weight: 501
|
||||
---
|
||||
|
||||
The `percentile()` function returns records from an input table with `_value`s that fall within
|
||||
a specified percentile or it returns the record with the `_value` that represents the specified percentile.
|
||||
The `quantile()` function returns records from an input table with `_value`s that fall within
|
||||
a specified quantile or it returns the record with the `_value` that represents the specified quantile.
|
||||
Which it returns depends on the [method](#method) used.
|
||||
|
||||
_**Function type:** Aggregate or Selector_
|
||||
_**Output data type:** Float or Object_
|
||||
|
||||
```js
|
||||
percentile(
|
||||
quantile(
|
||||
columns: ["_value"],
|
||||
percentile: 0.99,
|
||||
q: 0.99,
|
||||
method: "estimate_tdigest",
|
||||
compression: 1000.0
|
||||
)
|
||||
```
|
||||
|
||||
When using the `estimate_tdigest` or `exact_mean` methods, it outputs non-null
|
||||
records with values that fall within the specified percentile.
|
||||
records with values that fall within the specified quantile.
|
||||
|
||||
When using the `exact_selector` method, it outputs the non-null record with the
|
||||
value that represents the specified percentile.
|
||||
value that represents the specified quantile.
|
||||
|
||||
## Parameters
|
||||
|
||||
### columns
|
||||
A list of columns on which to compute the percentile.
|
||||
A list of columns on which to compute the quantile.
|
||||
Defaults to `["_value"]`.
|
||||
|
||||
_**Data type:** Array of strings_
|
||||
|
||||
### percentile
|
||||
A value between 0 and 1 indicating the desired percentile.
|
||||
### q
|
||||
A value between 0 and 1 indicating the desired quantile.
|
||||
|
||||
_**Data type:** Float_
|
||||
|
||||
|
@ -54,13 +55,13 @@ The available options are:
|
|||
|
||||
##### estimate_tdigest
|
||||
An aggregate method that uses a [t-digest data structure](https://github.com/tdunning/t-digest)
|
||||
to compute an accurate percentile estimate on large data sources.
|
||||
to compute an accurate quantile estimate on large data sources.
|
||||
|
||||
##### exact_mean
|
||||
An aggregate method that takes the average of the two points closest to the percentile value.
|
||||
An aggregate method that takes the average of the two points closest to the quantile value.
|
||||
|
||||
##### exact_selector
|
||||
A selector method that returns the data point for which at least percentile points are less than.
|
||||
A selector method that returns the data point for which at least `q` points are less than.
|
||||
|
||||
### compression
|
||||
Indicates how many centroids to use when compressing the dataset.
|
||||
|
@ -78,8 +79,8 @@ from(bucket: "telegraf/autogen")
|
|||
|> filter(fn: (r) =>
|
||||
r._measurement == "cpu" and
|
||||
r._field == "usage_system")
|
||||
|> percentile(
|
||||
percentile: 0.99,
|
||||
|> quantile(
|
||||
q: 0.99,
|
||||
method: "estimate_tdigest",
|
||||
compression: 1000.0
|
||||
)
|
||||
|
@ -92,8 +93,8 @@ from(bucket: "telegraf/autogen")
|
|||
|> filter(fn: (r) =>
|
||||
r._measurement == "cpu" and
|
||||
r._field == "usage_system")
|
||||
|> percentile(
|
||||
percentile: 0.99,
|
||||
|> quantile(
|
||||
q: 0.99,
|
||||
method: "exact_selector"
|
||||
)
|
||||
```
|
|
@ -26,4 +26,4 @@ The following functions can be used as both selectors or aggregates, but they ar
|
|||
categorized as aggregate functions in this documentation:
|
||||
|
||||
- [median](/v2.0/reference/flux/functions/built-in/transformations/aggregates/median)
|
||||
- [percentile](/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile)
|
||||
- [quantile](/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile)
|
||||
|
|
|
@ -9,10 +9,19 @@ menu:
|
|||
---
|
||||
|
||||
{{% note %}}
|
||||
_The latest release of InfluxDB v2.0 alpha includes **Flux v0.23.0**.
|
||||
_The latest release of InfluxDB v2.0 alpha includes **Flux v0.24.0**.
|
||||
Any newer versions of Flux will not be available until the next InfluxDB release._
|
||||
{{% /note %}}
|
||||
|
||||
## v0.24.0 [2019-04-01]
|
||||
|
||||
### Breaking changes
|
||||
- Rename `percentile()` function to `quantile()`.
|
||||
|
||||
### Bug fixes
|
||||
- Handle when a non-call expression is parsed as the pipe destination.
|
||||
- Add error message to Compile methods for empty Spec.
|
||||
|
||||
## v0.23.0 [2019-03-26]
|
||||
|
||||
### Breaking changes
|
||||
|
|
Loading…
Reference in New Issue