mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Transform: added merge transform that will merge multiple series/tables into one table (#25490)
* wip: added draft of series to rows. * wip: building dataFrame structure first and then adding data. * wip: added some refactorings of the seriesToRows transformer. * did some refactorings to make the code easier to follow. * added an editor for the transform. * renamed some of the test data. * added docs. * fixed according to feedback. * renamved files. * fixed docs according to feedback. * fixed so we don't keep labels or config values from. * removed unused field. * fixed spelling errors. * fixed docs according to feedback.
This commit is contained in:
@@ -67,6 +67,7 @@ Grafana comes with the following transformations:
|
||||
- [Apply a transformation](#apply-a-transformation)
|
||||
- [Transformation types and options](#transformation-types-and-options)
|
||||
- [Reduce](#reduce)
|
||||
- [Merge](#merge)
|
||||
- [Filter by name](#filter-by-name)
|
||||
- [Filter data by query](#filter-data-by-query)
|
||||
- [Organize fields](#organize-fields)
|
||||
@@ -93,6 +94,28 @@ After I apply the transformation, there is no time value and each column has bee
|
||||
|
||||
{{< docs-imagebox img="/img/docs/transformations/reduce-after-7-0.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
|
||||
### Merge
|
||||
|
||||
Use this transformation to combine the result from multiple queries into one single result based on the time field. This is helpful when using the table panel visualization.
|
||||
|
||||
In the example below, we are visualizing multiple queries returning table data before applying the transformation.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/transformations/table-data-before-merge-7-1.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
|
||||
Here is the same example after applying the merge transformation.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/transformations/table-data-after-merge-7-1.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
|
||||
If any of the queries return time series data, then a `Metric` column containing the name of the query is added. You can be customized this value by defining `Label` on the source query.
|
||||
|
||||
In the example below, we are visualizing multiple queries returning time series data before applying the transformation.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/transformations/time-series-before-merge-7-1.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
|
||||
Here is the same example after applying the merge transformation.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/transformations/time-series-after-merge-7-1.png" class="docs-image--no-shadow" max-width= "1100px" >}}
|
||||
|
||||
### Filter by name
|
||||
|
||||
Use this transformation to remove portions of the query results.
|
||||
|
||||
Reference in New Issue
Block a user