azure – How to map a json object to a column in Sql

I am trying to load and transform data from an API to Azure SQL using ADF copy activity. The data from json API(source) is in below format.

{
  "fdgdhgfh": {
    "so2_production": 7hjhgj953,
    "battery_charge": jkjlkj,
    "battery_discharge": kjlklj,
    "critical_load_energy": 4ljljh4
  },
  "9fsdsfb": {
   
    "so2_production": asdasd,
    "battery_charge": sdaasf
    "battery_discharge": ewewrwer
    "critical_load_energy": bmvkbjk
  }
}

I want to map “fdgdhgfh” or “9fsdsfb” to a column in Azure SQL using copy activity. By default when I import schemas I am getting object values “so2_production”,”battery_charge”,”battery_discharge”, “critical_load_energy to map in SQL but I want to map object not the object value.

Expected SQL Result from Table

Read more here: Source link