Skip to content

Commit

Permalink
Create mapHeader.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gqian3 committed Nov 20, 2019
1 parent ca8d85e commit 86f53c5
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions tests/shiftr_tests/mapHeader.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"input": {
"metadata": {
"id": "2",
"time": "2019-10-31T23:57:02Z"
},
"data": {
"kpi": "test",
"details": {
"headers": [
"someHeader",
"otherHeader"
],
"values": [
[
123,
2
],
[
456,
27
]
]
}
}
}

"spec": {
"data": {
"details": {
"values": {
"*": {
"*": {
"@": "data2[&2].@(4,headers[&0])"
},
"@(4,metadata)": {
"*": "data2[&2].&"
},
"@(4,metaData)": {
"*": "data2[&2].&"
},
"@(3,kpi)": "data2[&1].kpi"
}
}
}
}
},

"expected": {
"data2" : [ {
"id" : "2",
"time" : "2019-10-31T23:57:02Z",
"kpi" : "test",
"someHeader" : 123,
"otherHeader" : 2
}, {
"id" : "2",
"time" : "2019-10-31T23:57:02Z",
"kpi" : "test",
"someHeader" : 456,
"otherHeader" : 27
} ]
}
}

0 comments on commit 86f53c5

Please sign in to comment.