In your ADF pipeline, add a Data Flow activity.
Set up your source dataset pointing to your Excel file.
Then unpivot Columns:
- Use an Unpivot transformation to convert columns into rows. In the Unpivot transformation, you will select all the question columns (qn1, qn2, ..., qn50) to be unpivoted.
- Set the
Key
column to hold the column headers (qn1, qn2, ..., qn50) and theValue
column to hold the responses (qr1, qr2, ..., qr50).
If you need to rename the unpivoted columns for clarity, you can add a Derived Column transformation to rename the Key
and Value
columns to qn
and qr
respectively.
Configure your sink to write the transformed data to your desired destination (for example another Excel file, a database...).