Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
riptidas
Contributor
Contributor

Upserting a Nested Array into an Array object in Mongo Document

My Collection is something like below:

{

 "departmentCode": "1234",

 "departmentLocations": [

  {

   "code": "USNYC",

   "name": "New York"

  },

  {

   "code": "USLOS",

   "name": "Los Angels"

  }

 ]

}

My source is an oracle table, which have reference to the location code in the above collection.

I need to read from the oracle table and upsert into the above collection as below.

{

 "departmentCode": "1234",

 "departmentLocations": [

  {

   "code": "USNYC",

   "name": "New York",

   "postings": [

    {

     "name": "Mark Twain",

     "position": "Manager"

    },

    {

     "name": "Jimmy Bourne",

     "position": "Clerk"

    }

   ]

  },

  {

   "code": "USLOS",

   "name": "Los Angels",

   "postings": [

    {

     "name": "Harry Summers",

     "position": "Operator"

    },

    {

     "name": "Tommy Lane",

     "position": "Sales Rep"

    }

   ]

  }

 ]

}

I obviously cannot use "departmentLocations.postings" as my Data node in tMongoDBOutput component.

Can anyone please help?

Labels (3)
2 Replies
angamuthu1
Contributor II
Contributor II

Hi Riptidas,

I have a similar need, can you please share the resolution if you were able to solve the issue

riptidas
Contributor
Contributor
Author

Hello mohankanala,

 

Unfortunately I am yet to find a resolution.

Were you able to find a solution?