Transformations: Correct documentation around prepare time series (#102553)

* Correct documentation around prepare time series

* Update public/app/features/transformers/docs/content.ts

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
Kristina
2025-03-22 14:25:12 -05:00
committed by GitHub
parent 4d79d5e80c
commit bb8392c9a1
2 changed files with 57 additions and 42 deletions
@@ -1189,29 +1189,11 @@ Use this transformation to address issues when a data source returns time series
#### Available options
##### Multi-frame time series
Use this option to transform the time series data frame from the wide format to the long format. This is particularly helpful when your data source delivers time series information in a format that needs to be reshaped for optimal compatibility with your visualization.
**Example: Converting from wide to long format**
| Timestamp | Value1 | Value2 |
| ------------------- | ------ | ------ |
| 2023-01-01 00:00:00 | 10 | 20 |
| 2023-01-01 01:00:00 | 15 | 25 |
**Transformed to:**
| Timestamp | Variable | Value |
| ------------------- | -------- | ----- |
| 2023-01-01 00:00:00 | Value1 | 10 |
| 2023-01-01 00:00:00 | Value2 | 20 |
| 2023-01-01 01:00:00 | Value1 | 15 |
| 2023-01-01 01:00:00 | Value2 | 25 |
##### Wide time series
Select this option to transform the time series data frame from the long format to the wide format. If your data source returns time series data in a long format and your visualization requires a wide format, this transformation simplifies the process.
Select this option to transform the time series data frame from the long format to the wide format.
A wide time series combines data into a single frame with one shared, ascending time field. Time fields do not repeat and multiple values extend in separate columns.
**Example: Converting from long to wide format**
@@ -1229,6 +1211,32 @@ Select this option to transform the time series data frame from the long format
| 2023-01-01 00:00:00 | 10 | 20 |
| 2023-01-01 01:00:00 | 15 | 25 |
##### Multi-frame time series
Multi-frame time series break data into multiple frames that all contain two fields: a time field and a numeric value field. Time is always ascending. String values are represented as field labels.
##### Long time series
A long time series combines data to one frame, with the first field being an ascending time field. The time field might have duplicates. String values are in separate fields, and there might be more than one.
**Example: Converting to long format**
| Value1 | Value2 | Timestamp |
| ------ | ------ | ------------------- |
| 10 | 20 | 2023-01-03 00:00:00 |
| 30 | 40 | 2023-01-02 00:00:00 |
| 50 | 60 | 2023-01-01 00:00:00 |
| 70 | 80 | 2023-01-01 00:00:00 |
**Transformed to:**
| Timestamp | Value1 | Value2 |
| ------------------- | ------ | ------ |
| 2023-01-01 00:00:00 | 70 | 80 |
| 2023-01-01 01:00:00 | 50 | 60 |
| 2023-01-02 01:00:00 | 30 | 40 |
| 2023-01-03 01:00:00 | 10 | 20 |
### Reduce
Use this transformation to apply a calculation to each field in the data frame and return a single value. This transformation is particularly useful for consolidating multiple time series data into a more compact, summarized format. Time fields are removed when applying this transformation.