I'm querying an API using Azure Data Factory and the data I receive from the API looks like this.
{ "96":"29/09/2022", "95":"31/08/2022", "93":"31/07/2022" )
When I come to write this data to a table, ADF assumes the column names are the numbers and the dates are stored as rows like this
| 96 | 95 | 93 |
|---|---|---|
| 29/09/2022 | 31/08/2022 | 31/07/2022 |
when i would like it to look like this
| Date | ID |
|---|---|
| 29/09/2022 | 96 |
| 31/08/2022 | 95 |
| 31/07/2022 | 93 |
Does any one have any suggestions on how to handle this, I ideally want to avoid using USP's and dynamic SQL. I really only need the ID for the month of the previous one we're in.
PS - API doesn't support any filtering on this object
Updates
I'm querying the API using a web activity and if i try to store the data to an Array variable the activity fails as the output is an object.
When I use a copy data activity I've set the sink to automatically create the table and the mapping looks likes this
Thanks



