From e1e4ec544972c843a63a3cc32eaad21882014f0a Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 29 Mar 2019 13:33:07 -0600 Subject: [PATCH 1/4] rename percentile function to quantile --- .../aggregates/aggregatewindow.md | 2 +- .../transformations/aggregates/median.md | 28 ++++++------- .../aggregates/{percentile.md => quantile.md} | 39 ++++++++++--------- .../transformations/selectors/_index.md | 2 +- 4 files changed, 37 insertions(+), 34 deletions(-) rename content/v2.0/reference/flux/functions/built-in/transformations/aggregates/{percentile.md => quantile.md} (67%) diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md index e78bd28a5..35d40aa64 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/aggregatewindow.md @@ -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) ) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md index 94400689c..9aad99714 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/median.md @@ -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 ) diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile.md b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md similarity index 67% rename from content/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile.md rename to content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md index b663c3a1f..bf5f35272 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/percentile.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/aggregates/quantile.md @@ -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" ) ``` diff --git a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/_index.md b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/_index.md index aa83f6962..cf67e6d44 100644 --- a/content/v2.0/reference/flux/functions/built-in/transformations/selectors/_index.md +++ b/content/v2.0/reference/flux/functions/built-in/transformations/selectors/_index.md @@ -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) From ed0575be56613a6ae775dbcd523ecba76082390a Mon Sep 17 00:00:00 2001 From: Kelly Date: Fri, 29 Mar 2019 13:49:41 -0700 Subject: [PATCH 2/4] change delete to export --- content/v2.0/process-data/manage-tasks/export-task.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/v2.0/process-data/manage-tasks/export-task.md b/content/v2.0/process-data/manage-tasks/export-task.md index 0c222ba83..d491698b7 100644 --- a/content/v2.0/process-data/manage-tasks/export-task.md +++ b/content/v2.0/process-data/manage-tasks/export-task.md @@ -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" >}} From fec833e5523e06ae726537791a34ee2b572ab481 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 1 Apr 2019 11:20:05 -0600 Subject: [PATCH 3/4] added flux-0.24 to flux release notes --- content/v2.0/reference/flux/release-notes.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/v2.0/reference/flux/release-notes.md b/content/v2.0/reference/flux/release-notes.md index 80916a134..13a3a9ff1 100644 --- a/content/v2.0/reference/flux/release-notes.md +++ b/content/v2.0/reference/flux/release-notes.md @@ -13,6 +13,15 @@ _The latest release of InfluxDB v2.0 alpha includes **Flux v0.23.0**. Any newer versions of Flux will not be available until the next InfluxDB release._ {{% /note %}} +## v0.23.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 From 334a3787ea6131d998aff9764aeb59676f42c2b2 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 1 Apr 2019 11:26:27 -0600 Subject: [PATCH 4/4] fixed version number in flux release notes --- content/v2.0/reference/flux/release-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/v2.0/reference/flux/release-notes.md b/content/v2.0/reference/flux/release-notes.md index 13a3a9ff1..2fbc47c5a 100644 --- a/content/v2.0/reference/flux/release-notes.md +++ b/content/v2.0/reference/flux/release-notes.md @@ -9,11 +9,11 @@ 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.23.0 [2019-04-01] +## v0.24.0 [2019-04-01] ### Breaking changes - Rename `percentile()` function to `quantile()`.