Dependencies & cluster requirements
Dependencies & cluster requirements
Dependencies:
- ProphecySparkBasicsPython 0.2.36+
- UC dedicated clusters 14.3+ supported
- UC standard clusters 14.3+ supported
- Livy clusters not supported
If you want to pivot the data, rather than unpivot, use the Aggregate gem.
Parameters
Example
Imagine you have sales data for different products, with each quarter’s sales stored in its own column—this is known as wide format. Before modeling seasonal trends or doing time series analysis, it’s often helpful to convert this into long format, where each row represents a single observation.- Select the identifier columns. In the example above, the
Productcolumn is the identifier column. - Select the columns to unpivot. In the example above, all of the quarter columns (
Q1,Q2, etc.) are your columns to unpivot. - Name the variable column
Quarterbecause it identifies the sales period. - Name the value column
UnitsSoldbecause it contains number of units sold per quarter. - Save and run the gem.
- The quarter names (
Q1,Q2, etc.) will move into a newQuartercolumn. - The corresponding sales values will be stored in a
UnitsSoldcolumn.

