Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Who agreed with this solution

avatar
Super Guru

Hi,

This one was a little trickier from the first post, but it seems that there is nothing that you cant do with Jolt 🙂 . Please try the following spec:

 

[
  {
    // combine all resourceRelationshipCharacteristic under one group
    // and assign each element under the group unique key depending on
    // its index location starting from first array under resourceRelationship (&3) and
    // and ending with nested array resourceRelationshipCharacteristic ($1) so
    // each element will have unique name 00,01,10,11...
    "operation": "shift",
    "spec": {
      "resource": {
        "resourceRelationship": {
          "*": {
            "resourceRelationshipCharacteristic": {
              "*": {
                "@(6,header.action)": "&3&1.action",
                "@(6,header.timeStamp)": "&3&1.timeStamp",
                "@(2,relationDrniId)": "&3&1.relationDrniId",
                "*": "&3&1.&"
              }
            }
          }
        }
      }
    }
  },
  {
    // bucket each element (00,01,10,11) value into new Array records
    "operation": "shift",
    "spec": {
      "*": "records.[#1]"
    }
  }
]

 

Hope that helps.

I wonder if there is better\cleaner way @araujo  @cotopaul @steven-matison 

View solution in original post

Who agreed with this solution