IntegrationHub ETL - take an array and make into multiple relationships
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2022 08:52 AM
Looking at moving an old REST into IntegrationHub ETL so we can make use of the IRE
At the moment the existing manual process retrieves processes, then applications and then gets all of the relationships and creates / updates as required.
So I have a data source and created an ETL and I can Preview and Prepate the Data
I have a record with 5 columns, 3 are dead easy to map, but the last 2 are aa array of JSON objects. The first is easy as while it is an array of objects, only one entry is returned (username) and I can transform to return the users name. The second is an array of multiple objects and they are all related to a record in cmdb_ci_business_app , so I see
[{"id":"1","name":"a"},{"id":"2","name":"b"},{"id":"3","name":"c"}]
How do a I do create a transform on that so I can take each row and associate to a record in cmdb_ci_business_app and create the relationships ? I don't see any thing in the transform that indicates it could do this
I cannot use DataStream where I have seen an example that shows a tree and also most options on the REST side, so this is purely IntegrationHub REST which limits my options in the data source
TIA
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 08:55 AM
Hi! Did you ever come up with a solution to this? I have the same situation .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 07:44 AM
Back on this today. Perhaps I need to explain this a little better.
I import the data which is for the business process table, and one of the attributes is an array of JSON objects and within that I can get a unique identifier of a related business application
I have a transform that will process the array and from there return me an array / comma delimited list of the relevant sys_id of the business application
What I need to do is to create Relationships between the Business process and each of the apps in the transformed u_platformhostsapp_1
No option to create a Relationship unless I add a second table to the "Map data to the CMDB and Add Relationships", which I can understand but all ihave is an ID, so no data to add to the Business app table.
But I am also not sure how it would process the array ?
When I look at the IntegrationHub Data stream and a couple of examples, I can see this information is split out and is easier to do, but the client does not have that level of IntegratioHub and so I am left with the standard REST, which does look a bit limited
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
Assuming you have complete control on the incoming data, it should all be json, then there's an automatic 1-to-many relationship inside ETL (which you still need to map in the cmdb_rel_ci table). There's an article somewhere by Siyou Li (I think) which shows how to map a multilevel json.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 10:20 AM
Hi Mahak2,
I have a similar scenario and hoping to see if you can assist.
Consider this payload:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2024 11:11 PM - edited ‎10-20-2024 11:23 PM
It looks like you have to create the Data Source as a File type with the format of JSON and attach the raw JSON payload first. 😕
It's gone over here but it never mentions how to use it with an actual DATA STREAM from within Flow Designer.
https://www.youtube.com/watch?v=jonkMkFiNaQ