To create the output table, the function pivots the input table on the partition columns (sn, city, and week) and outputs the contents of the target column (value) in dense format in the output columns value_0, value_1, and value_2, which contain the temperature, pressure, and dewpoint, respectively.
sn | city | week | value_0 | value_1 | value_2 |
---|---|---|---|---|---|
1 | Asheville | 1 | 32 | 1020.8 | 27.6F |
2 | Asheville | 2 | 32 | 1021.3 | 27.4F |
3 | Asheville | 3 | 34 | 1021.7 | 28.2F |
4 | Nashville | 1 | 42 | 1021 | 29.4F |
5 | Nashville | 2 | 44 | 1019.8 | 29.2F |
6 | Brownsville | 2 | 47 | 1019 | 28.9F |
7 | Brownsville | 3 | 46 | 1019.2 | 28.9F |