What is a "long" and a "wide" table?

Modified on Mon, 11 Apr 2022 at 01:34 PM

These terms relate mainly to tables which capture a data series (for example time series data, but could also be a frequency response or a variable over engine speed).

Long table

A long table is when each data row captures a single point in time. So, a time series (as example) is stored over as many rows as there are time steps in the series. To distinguish the different series in a dataset you need to have an ID column which changes whenever a new series starts.

Wide table

In a wide table all information of one series is stored within a single line. In that case you have as many columns as there are data points captured in the series. Each line describes an entire curve of the same input variable.

See below how the long table example from above would like as a wide table:

As a wide table is sort of condensing the shown data you have to make a decision on the labels of the new columns. On the Monolith platform the approach is: use the label of the former “value” column as the first part of the label and add the value of the “time” column added. This way the information is lost that the value in the column labels is time. You just need to know this.

Conversion between these two formats

The two manipulators Long-to-wide and Wide-to-long are transforming a dataset between these two table representations.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article