Transpose is a "dangerous" transformation since it creates new columns dynamically based on row values. Carefully analyze your log and view the output data from the transformation to understand the miss match between meta data and physical data.
Sadly, there is no silver bullet here.
If you want to have fixed output layout you probably need somehow hard code the columns you like to keep.
There are ways to generete meta data on the fly - but that's usually complicating the overall solution.
Data never sleeps