Pivot Operation Use Cases
In this guide, we will be discussing an scenario in which Pivot operation can be used.
Parameters :
Get Key : We will provide the keyname which holds our array data.
Transposed Key Name : Name of key which need to be transposed as keyname.
Transposed Value : Name of key which need to be transposed as value.
Note: All the three variables are mandatory to pass.
Sample Input for Pivot Operation :
{"bizdata_dataset":{
"id":123,
"name":"sample",
"lastname":"dataset",
"attributes":[
{
"attributename":"item",
"attributevalue":"27",
"attribute_code":12234
},
{
"attributename":"item2",
"attributevalue":"47",
"attribute_code":12334
},
{
"attributename":"item1",
"attributevalue":"37",
"attribute_code":13234
}]}}
Pivot Operation Input Values :
Parameter : Get Key
attributes
Parameter : Transposed Key Name
"attributename"
Parameter : Transposed Value
"attributevalue"
Sample Output after using Pivot Operation :
{"bizdata_dataset":{
"id": 123,
"name": "sample",
"lastname": "dataset",
"attributes":[
{
"attributename": "item",
"attributevalue": "27",
"attribute_code": 12234
},
{
"attributename": "item2",
"attributevalue": "47",
"attribute_code": 12334
},
{
"attributename": "item1",
"attributevalue": "37",
"attribute_code": 13234
}],
"item": "27",
"item2": "47",
"item1": "37"}}