May 13, 2021
Thank you for the explanation.
I tried your approach,
https://gist.github.com/mkaranasou/8e21489d584ee21972c0d579fbd7e814
and my understanding is that it works only if you collect all your data in one row and then explode.
If we don't do this then the result is like in the gist.
+-------+-------+------+
|column1|column2|row_id|
+-------+-------+------+
| 1| 2| 1|
| 1| 2| 2|
| 15| 21| 1|
| 15| 21| 2|
+-------+-------+------+
Could you share an example of how you gather your data in one row to do this?