I have created the simple SDC pipeline with json as input data.
When i pivot the list item from json, it works fine when list has the elements but its eliminates the records when list is empty
Pivot on revision works but requirements does not produce record
Appreciate any help . Thanks in advance.
{
"id": 22,
"active": true,
"code": "210_34",
"productcomponents": [],
"category": {
"id": 21,
"code": "SOP",
"name": "Standard Operating Procedures"
},
"revisions": [
{
"id": 27,
"active": true,
"created": "2020-08-19 15:45:18"
}
],
"requirements": []
}
Solved
Pivot stage on empty json list
Best answer by mikelsr
If I understood correctly, perhaps we could add another stage to filter out the pivoted fields, and then merge the output records of that stage and the pivot stage like in the following image.

If both stages filter the `/revisions` field you get the following input records in the destination stage:

Is this closer to what you expected? You can find the exported pipeline attached to this message.
Regards
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.