Notifications
Clear all

[Solved] IB JSON Processor (my first IB and my project's first JSON IB processor)

2 Posts
2 Users
2 Reactions
2,214 Views
1
Topic starter

Hello!

My team needs to create an IB Processor which needs to consume a file containing JSON objects, then update related records in some of our models. It's our first JSON processor -- and it's my first-ever exchange task.

Could you point me to resources/documentation or give advice that would help me execute this task efficiently/correctly?

Thanks so much!

 

V/R,
Juliana

 

1 Answer
1

Hi Juliana - to implement this, you would use an Inbound Interface with a "Custom Processor".

The help topic here https://docs.onenetwork.com/devnet/latest/platform-user-s-guide/integration/inbound-interfaces/custom has some basic information.

 

This doesn't go into much detail about how to write it to the database.  Here, you would take the data out of the JSON, put it into Model objects, and use ModelDataService to write it.  Remember that it is more efficient to execute 1 model write action with a list of 100 objects, than 100 model write actions with 1 object each.

 

Last point - if your JSON will be extremely large (multi-MB), this may require additional care and discussion.  If it is not multi-MB in size, then the approach from the help topic should be fine.

Juliana Topic starter 2023-07-20 15:50:58

@gmerrill Thank you, Greg! We can expect the files to be about 5MB each. This IB will run daily & we might receive more than one of those ~5MB files each day. We can also expect the possibility of a monthly load on the order of 200 5MB files. I'll send project-specific details to you offline.