You need to create a new data flow within ADF and add your source dataset.
Since your transformation requires different structures for "P_name" and "P_number" versus the financial years and monthly data, you'll likely need to split your data into two streams for processing:
- Stream 1: directly maps "P_name" and "P_number"
- Stream 2: handles the transformation of fiscal year and monthly data
For the second stream, you'll need :
- Pivot Transformation to transform the fiscal year and monthly columns into rows
- Aggregate Transformation to calculate totals for each fiscal year. You may need to create expressions to parse the dollar amounts and sum them up
- Join Transformation to bring back the "P_name" and "P_number" information into this stream, if needed.
After transforming the data, use the Derived Column transformation to construct the new JSON structure for both streams. You may need to create complex expressions to build the nested JSON objects as per your requirement.
Finally, configure a sink to output your data. Since you want the output in JSON format, make sure to choose a dataset that supports JSON output (example Azure Blob Storage or Azure Data Lake Store) and configure the output to match the structure you need.