From b07b6544f12837c06c3c009ef8de706cf23418cd Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 22 Jan 2019 08:29:28 -0700 Subject: [PATCH] moved custom functions guide into query data guides --- .../v2.0/query-data/flux/get-started/syntax-basics.md | 2 +- .../v2.0/query-data/flux/get-started/transform-data.md | 2 +- .../flux/guides}/custom-functions.md | 9 +++++---- .../v2.0/query-data/flux/guides/regular-expressions.md | 2 +- content/v2.0/reference/flux/functions/_index.md | 4 ---- 5 files changed, 8 insertions(+), 11 deletions(-) rename content/v2.0/{reference/flux/functions => query-data/flux/guides}/custom-functions.md (96%) diff --git a/content/v2.0/query-data/flux/get-started/syntax-basics.md b/content/v2.0/query-data/flux/get-started/syntax-basics.md index ad69de95c..3770bf467 100644 --- a/content/v2.0/query-data/flux/get-started/syntax-basics.md +++ b/content/v2.0/query-data/flux/get-started/syntax-basics.md @@ -183,7 +183,7 @@ topN = (tables=<-, n) => tables |> sort(desc: true) |> limit(n: n) {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} -_More information about creating custom functions is available in the [Custom functions](/v2.0/reference/flux/functions/custom-functions) documentation._ +_More information about creating custom functions is available in the [Custom functions](/v2.0/query-data/flux/guides/custom-functions) documentation._ Using the `cpuUsageUser` data stream variable defined above, find the top five data points with the custom `topN` function and yield the results. diff --git a/content/v2.0/query-data/flux/get-started/transform-data.md b/content/v2.0/query-data/flux/get-started/transform-data.md index b075ca8d7..8658cba27 100644 --- a/content/v2.0/query-data/flux/get-started/transform-data.md +++ b/content/v2.0/query-data/flux/get-started/transform-data.md @@ -34,7 +34,7 @@ from(bucket:"example-bucket") ## Flux functions Flux provides a number of functions that perform specific operations, transformations, and tasks. -You can also [create custom functions](/v2.0/reference/flux/functions/custom-functions) in your Flux queries. +You can also [create custom functions](/v2.0/query-data/flux/guides/custom-functions) in your Flux queries. _Functions are covered in detail in the [Flux functions](/v2.0/reference/flux/functions) documentation._ A common type of function used when transforming data queried from InfluxDB is an aggregate function. diff --git a/content/v2.0/reference/flux/functions/custom-functions.md b/content/v2.0/query-data/flux/guides/custom-functions.md similarity index 96% rename from content/v2.0/reference/flux/functions/custom-functions.md rename to content/v2.0/query-data/flux/guides/custom-functions.md index 9365f72d9..11094e717 100644 --- a/content/v2.0/reference/flux/functions/custom-functions.md +++ b/content/v2.0/query-data/flux/guides/custom-functions.md @@ -1,11 +1,12 @@ --- title: Create custom Flux functions +seotitle: Create custom Flux functions description: Create your own custom Flux functions to transform and manipulate data. menu: - v2_0_ref: - name: Custom functions - parent: Flux functions - weight: 6 + v2_0: + name: Create custom functions + parent: How-to guides + weight: 8 --- Flux's functional syntax allows for custom functions. diff --git a/content/v2.0/query-data/flux/guides/regular-expressions.md b/content/v2.0/query-data/flux/guides/regular-expressions.md index ecda474e3..7112b670d 100644 --- a/content/v2.0/query-data/flux/guides/regular-expressions.md +++ b/content/v2.0/query-data/flux/guides/regular-expressions.md @@ -6,7 +6,7 @@ menu: v2_0: name: Regular expressions parent: How-to guides - weight: 7 + weight: 9 --- Regular expressions (regexes) are incredibly powerful when matching patterns in large collections of data. diff --git a/content/v2.0/reference/flux/functions/_index.md b/content/v2.0/reference/flux/functions/_index.md index 6832835ca..a6f31fd37 100644 --- a/content/v2.0/reference/flux/functions/_index.md +++ b/content/v2.0/reference/flux/functions/_index.md @@ -23,7 +23,3 @@ Transformation functions transform or shape your data in specific ways. ## [Miscellaneous functions](/v2.0/reference/flux/functions/misc) Functions that serve miscellaneous purposes when writing Flux scripts. - -## [Custom functions](/v2.0/reference/flux/functions/custom-functions) -Flux's functional syntax allows for custom functions. -This guide walks through the basics of creating your own function.