Setting company using the service graph connector for observability (dynatrace)

Dave80
Kilo Explorer

Evening all

We are setting up an integration using the above connector and need to set the company field on the CIs (domain separated instance) We have been advised to do this via the integration hub ETL plugin but I can not see how this is set and I am not keen to touch the robust transformer. As a work around it has been suggested to just set via a business rule however that is not a path we want to go down.

Can anyone suggest how this is done as I have never users the graph connectors or the robust transformer

 

Thanks in advance

 

Jack

 

 

2 REPLIES 2

Jack62
Giga Guru

Just to provide further info,I have created the below script this is a Robust Transform Engine Entity Script Operation with an operation type of script operation. At the moment, justto populate the company field using the robust transformer I have hard coded the company sys Id. Ultimately this needs to be set dynamically, either via the domain set or the created_by.company (service account will be used to create records.

 

(function(batch, output) {
for (var i = 0; i < batch.length; i++) {

//step1: access the input variables
var a = batch[i].input; //Value of the source field.

//step2: Your script/code goes here.
var b = a + 1;

//step3: set the output for each elements
output[i] = b;
}

})(batch, output);
*/

(function(batch, output) {
for (var i = 0; i < batch.length; i++) {

//step1: access the input variables
var a = batch[i].input; //Value of the source field.

//step2: Your script/code goes here.
// if(a == 'bmsgroup.com'){

var b = '72bbdf9e1b8240d8adfdea0e6e4bcbad';

// }

//step3: set the output for each elements
output[i] = b;
}
})(batch, output);

Not applicable

This looks mostly correct to me. I would propose that for it to be dynamic you will need to issue a GlideRecord query.  You could create a custom lookup table of inputs->companies where input is a string field and company is a reference field.  Then you could query this table using GlideRecord and set to the sys id of the company returned in the query.  Once you have the company sys id you can map it to the company for the appropriate CI classes in the mapping.

You should be able to preview the output as the last step in the IntegrationHub ETL.  This will allow you to tweak the script as necessary until you see the output is set the way you intend it to be.