for your data transformation you can only use Pivoting node if you add group and sequence columns to your table. Avoiding loop might be good idea if you are working with 10+ million of rows. See here how to simply add group and sequence columns to your table: