IntegrationHub ETL - take an array and make into multiple relationships

poyntzj
Kilo Sage

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

9 REPLIES 9

Mahak2
Kilo Guru

Hello,

You can use the below option to create the transform for array in IntegrationHub ETL.

You can click on "New Transform" button and select "Use Source Column" and then select script operation to write the required script:

find_real_file.pngfind_real_file.png

Kindly check and let me know if this was helpful.

Please mark my response as helpful/correct in case it solves your issue.

 

Thanks

I'll look at this next week now.  A couple of issues on the instance and a separate issue means it has dropped down my priority list

Hello,

 

Did you get the chance to review my response and try it ?

Kindly let me know it was helpful.

If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.

 

Thanks