Docs: Clarify transformation functions reference docs (#46903)
* Docs: Remove 'Reference' prefix from all reference topic filenames: Per issue #46818, prefixing reference topics with "Reference" can damage usability. Remove the prefix from filenames. * Docs: Remove "Reference:" prefix from titles and ToC headings: Per issue #46818, prefixing reference topics with "Reference" can damage usability. Remove the prefix from titles and ToC headings. H1s retain the prefix to emphasize the nature of the doc without affecting the docs' discoverability. * Docs: Move Transformation functions reference alongside Transformation docs * Docs: Update links to reference docs in Transformation docs * Docs: Update links to reference docs in Panels docs * Docs: Update links to query options reference across docs * Docs: Update links to standard field definitions reference across docs * Docs: Update links to calculation types reference across docs * Docs: Update links to transformation functions reference across docs * Docs: Rename apply transformation doc filename to add transformation * Docs: Rename apply transformation doc to add transformation * Docs: Update links to add transformation doc across docs * Docs: Update relrefs in Transformation functions reference
This commit is contained in:
+3
-3
@@ -1,10 +1,10 @@
|
||||
+++
|
||||
title = "Reference: Calculation types"
|
||||
aliases = ["/docs/grafana/latest/panels/calculations-list/", "/docs/sources/panels/reference-calculation-types/"]
|
||||
title = "Calculation types"
|
||||
aliases = ["/docs/grafana/latest/panels/calculations-list/", "/docs/sources/panels/reference-calculation-types/", "/docs/grafana/latest/panels/reference-calculation-types"]
|
||||
weight = 1100
|
||||
+++
|
||||
|
||||
# Reference: Calculations
|
||||
# Reference: Calculation types
|
||||
|
||||
Refer to the following list of calculations you can perform in Grafana. You can find these calculations in the **Transform** tab and in the bar gauge, gauge, and stat visualizations.
|
||||
|
||||
@@ -21,10 +21,9 @@ A query returns data that Grafana visualizes in dashboards. When you create a pa
|
||||
1. Click the **Data source** drop-down menu and select a data source.
|
||||
1. Click **Query options** to configure the maximum number of data points returned by the query and how frequently you want the query to request data from the data source.
|
||||
|
||||
For more information about query options, refer to [Reference: Query options]({{< relref "../reference-query-options.md" >}}).
|
||||
For more information about query options, refer to [Query options]({{< relref "../query-options.md" >}}).
|
||||
|
||||
1. Write the query.
|
||||
|
||||
1. Click **Apply**.
|
||||
|
||||
The system queries the data source and presents the data in the visualization.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Reference: Query options"
|
||||
aliases = ["/docs/sources/panels/reference-query-options/"]
|
||||
title = "Query options"
|
||||
aliases = ["/docs/sources/panels/reference-query-options/", "/docs/grafana/latest/panels/reference-query-options"]
|
||||
weight = 900
|
||||
+++
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Reference: Standard field definitions"
|
||||
aliases = ["/docs/sources/panels/reference-standard-field-definitions/"]
|
||||
title = "Standard field definitions"
|
||||
aliases = ["/docs/sources/panels/reference-standard-field-definitions/", "/docs/grafana/latest/panels/reference-standard-field-definitions"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
@@ -21,8 +21,7 @@ You can also use the output of one transformation as the input to another transf
|
||||
|
||||
## Transformation types
|
||||
|
||||
Grafana provides a number of ways that you can transform data. For a complete list of transformations, refer to
|
||||
[Reference: Transformation functions]({{< relref "../reference-transformation-functions.md" >}}).
|
||||
Grafana provides a number of ways that you can transform data. For a complete list of transformations, refer to [Transformation functions]({{< relref "transformation-functions.md" >}}).
|
||||
|
||||
## Order of transformations
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
+++
|
||||
title = "Add a transformation to data"
|
||||
weight = 20
|
||||
aliases = ["/docs/sources/panels/transform-data/add-transformation-to-data/", "/docs/sources/panels/transform-data/apply-transformation-to-data", "/docs/grafana/latest/panels/transform-data/apply-transformation-to-data"]
|
||||
+++
|
||||
|
||||
# Add a transformation function to data
|
||||
|
||||
The following steps guide you in adding a transformation to data. This documentation does not include steps for each type of transformation. For a complete list of transformations, refer to [Transformation functions]({{< relref "transformation-functions.md" >}}).
|
||||
|
||||
## Before you begin
|
||||
|
||||
- [Add a query]({{< relref "../query-a-data-source/add-a-query.md" >}}).
|
||||
|
||||
**To apply a transformation function to data**:
|
||||
|
||||
1. Navigate to the panel where you want to add one or more transformations.
|
||||
1. Click the panel title and then click **Edit**.
|
||||
1. Click the **Transform** tab.
|
||||
1. Click a transformation.
|
||||
|
||||
A transformation row appears where you configure the transformation options. For more information about how to configure a transformation, refer to [Transformation functions]({{< relref "transformation-functions.md" >}}).
|
||||
|
||||
For information about available calculations, refer to [Calculation types]({{< relref "../calculation-types.md" >}}).
|
||||
|
||||
1. To apply another transformation, click **Add transformation**.
|
||||
|
||||
This transformation acts on the result set returned by the previous transformation.
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/transformations-7-0.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
@@ -1,30 +0,0 @@
|
||||
+++
|
||||
title = "Apply a transformation to data"
|
||||
weight = 20
|
||||
aliases = ["/docs/sources/panels/transform-data/apply-transformation-to-data/"]
|
||||
+++
|
||||
|
||||
# Apply a transformation function to data
|
||||
|
||||
The following steps guide you in applying a transformation to data. This documentation does not include steps for each type of transformation. For a complete list of transformations, refer to [Reference: Transformation functions]({{< relref "../reference-transformation-functions.md" >}}).
|
||||
|
||||
## Before you begin
|
||||
|
||||
- [Add a query]({{< relref "../query-a-data-source/add-a-query.md" >}}).
|
||||
|
||||
**To apply a transformation function to data**:
|
||||
|
||||
1. Navigate to the panel where you want to add one or more transformations.
|
||||
1. Click the panel title and then click **Edit**.
|
||||
1. Click the **Transform** tab.
|
||||
1. Click a transformation.
|
||||
|
||||
A transformation row appear where you configure the transformation options. For more information about how to configure a transformation, refer to [Reference: Transformation functions]({{< relref "../reference-transformation-functions.md" >}}).
|
||||
|
||||
For information about available calculations, refer to [Reference: Calculations]({{< relref "../reference-calculation-types.md" >}}).
|
||||
|
||||
1. To apply another transformation, click **Add transformation**.
|
||||
|
||||
This transformation acts on the result set returned by the previous transformation.
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/transformations-7-0.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Reference: Transformation functions"
|
||||
aliases = ["/docs/grafana/latest/panels/transformations/types-options/", "docs/sources/panels/reference-transformation-functions/"]
|
||||
title = "Transformation functions"
|
||||
aliases = ["/docs/grafana/latest/panels/transformations/types-options/", "/docs/sources/panels/reference-transformation-functions/", "/docs/grafana/latest/panels/reference-transformation-functions"]
|
||||
weight = 1000
|
||||
+++
|
||||
|
||||
@@ -16,7 +16,7 @@ Use this transformation to add a new field calculated from two other fields. Eac
|
||||
- **Reduce row -** Apply selected calculation on each row of selected fields independently.
|
||||
- **Binary option -** Apply basic math operation(sum, multiply, etc) on values in a single row from two selected fields.
|
||||
- **Field name -** Select the names of fields you want to use in the calculation for the new field.
|
||||
- **Calculation -** If you select **Reduce row** mode, then the **Calculation** field appears. Click in the field to see a list of calculation choices you can use to create the new field. For information about available calculations, refer to [Reference: Calculations]({{< relref "./reference-calculation-types.md" >}}).
|
||||
- **Calculation -** If you select **Reduce row** mode, then the **Calculation** field appears. Click in the field to see a list of calculation choices you can use to create the new field. For information about available calculations, refer to [Calculation types]({{< relref "../calculation-types.md" >}}).
|
||||
- **Operation -** If you select **Binary option** mode, then the **Operation** fields appear. These fields allow you to do basic math operations on values in a single row from two selected fields. You can also use numerical values for binary operations.
|
||||
- **Alias -** (Optional) Enter the name of your new field. If you leave this blank, then the field will be named to match the calculation.
|
||||
- **Replace all fields -** (Optional) Select this option if you want to hide all other fields and display only your calculated field in the visualization.
|
||||
@@ -189,7 +189,7 @@ Conditions that are invalid or incompletely configured are ignored.
|
||||
|
||||
## Group by
|
||||
|
||||
This transformation groups the data by a specified field (column) value and processes calculations on each group. Click to see a list of calculation choices. For information about available calculations, refer to the [List of calculations]({{< relref "./reference-calculation-types.md" >}}).
|
||||
This transformation groups the data by a specified field (column) value and processes calculations on each group. Click to see a list of calculation choices. For information about available calculations, refer to [Calculation types]({{< relref "../calculation-types.md" >}}).
|
||||
|
||||
Here's an example of original data.
|
||||
|
||||
@@ -323,7 +323,7 @@ After merge:
|
||||
|
||||
## Merge
|
||||
|
||||
Use this transformation to combine the result from multiple queries into one single result. This is helpful when using the table panel visualization. Values that can be merged are combined into the same row. Values are mergeable if the shared fields contain the same data. For information, refer to [Table panel]({{< relref "../visualizations/table/_index.md" >}}).
|
||||
Use this transformation to combine the result from multiple queries into one single result. This is helpful when using the table panel visualization. Values that can be merged are combined into the same row. Values are mergeable if the shared fields contain the same data. For information, refer to [Table panel]({{< relref "../../visualizations/table/_index.md" >}}).
|
||||
|
||||
In the example below, we have two queries returning table data. It is visualized as two separate tables before applying the transformation.
|
||||
|
||||
@@ -493,7 +493,7 @@ As you can see each row in the source data becomes a separate field. Each field
|
||||
|
||||
> **Note:** This transformation is available in Grafana 7.5.10+ and Grafana 8.0.6+.
|
||||
|
||||
Prepare time series transformation is useful when a data source returns time series data in a format that isn't supported by the panel you want to use. For more information about data frame formats, refer to [Data frames]({{< relref "../developers/plugins/data-frames.md" >}}).
|
||||
Prepare time series transformation is useful when a data source returns time series data in a format that isn't supported by the panel you want to use. For more information about data frame formats, refer to [Data frames]({{< relref "../../developers/plugins/data-frames.md" >}}).
|
||||
|
||||
This transformation helps you resolve this issue by converting the time series data from either the wide format to the long format or the other way around.
|
||||
|
||||
@@ -83,7 +83,7 @@ By default, Grafana specifies the color of your series data, which you can chang
|
||||
|
||||
## Sort series
|
||||
|
||||
Change legend mode to **Table** and choose [calculations]({{< relref "../reference-calculation-types.md" >}}) to be displayed in the legend. Click the calculation name header in the legend table to sort the values in the table in ascending or descending order.
|
||||
Change legend mode to **Table** and choose [calculations]({{< relref "../calculation-types.md" >}}) to be displayed in the legend. Click the calculation name header in the legend table to sort the values in the table in ascending or descending order.
|
||||
|
||||
The sort order affects the positions of the bars in the Bar chart panel as well as the order of stacked series in the Time series and Bar chart panels.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ The data model used in Grafana, namely the [data frame]({{< relref "../../develo
|
||||
|
||||
Field options allow you to change how the data is displayed in your visualizations. Options and overrides that you apply do not change the data, they change how Grafana displays the data. When you change an option, it is applied to all fields, meaning all series or columns. For example, if you change the unit to percentage, then all fields with numeric values are displayed in percentages.
|
||||
|
||||
For a complete list of field formatting options, refer to [Reference: Standard field definitions]({{< relref "../reference-standard-field-definitions.md" >}}).
|
||||
For a complete list of field formatting options, refer to [Standard field definitions]({{< relref "../standard-field-definitions.md" >}}).
|
||||
|
||||
> You can apply standard options to most built-in Grafana panels. Some older panels and community panels that have not updated to the new panel and data model will be missing either all or some of these field options.
|
||||
|
||||
@@ -26,6 +26,6 @@ For a complete list of field formatting options, refer to [Reference: Standard f
|
||||
|
||||
1. Select the standard options you want to apply.
|
||||
|
||||
For more information about standard options, refer to [Reference: Standard field definitions]({{< relref "../reference-standard-field-definitions/index.md" >}}).
|
||||
For more information about standard options, refer to [Standard field definitions]({{< relref "../standard-field-definitions/index.md" >}}).
|
||||
|
||||
1. To preview your change, click outside of the field option box you are editing or press **Enter**.
|
||||
|
||||
Reference in New Issue
Block a user