Target table? Use robust transformation to create incident,change & problem from this file in

angel kumari
Tera Contributor

Hi, Everybody

I am stuck in transform table ,bez i have data there has mixed up data like incident ,change ,probleb so i stuck in transform i.e while i have all these record then target table name is what could you plz suggect the table name .

then easily map in all 3 table field.

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@angel kumari 

Since you need to transform data from one staging table to multiple tables incident, problem and change. I suggest creating multiple transform maps on your Data source. Inside your transform script, you can filter the record on the basis of your filter criteria and transform the records on the respective tables.

 

Screenshot 2023-09-20 at 8.33.21 PM.png

View solution in original post

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@angel kumari 

Since you need to transform data from one staging table to multiple tables incident, problem and change. I suggest creating multiple transform maps on your Data source. Inside your transform script, you can filter the record on the basis of your filter criteria and transform the records on the respective tables.

 

Screenshot 2023-09-20 at 8.33.21 PM.png

Hi 

Thankyou for wonder response.

But there has option mention only  not target table so that little confuse.so will you elabrote its plz.

EXTERNAL NUMBERShort description DescriptionCallerTypeConfiguration ItemISSUE DATE
INC00001Issue with PrinterBluevoyant printer is not workingSystem administratorIncidentServiceNow11June 2023
CHG00001Router confModify the router configuration to meet the system and network requirement.System administratorChangeServiceNow23 June 2023
PRB00001Network reset is neededDue to the network reset issue, we need to change the modemSystem administratorProblemServiceNow2 Aug 2023

@angel kumari I am assuming you have created a data source to import your data from an external source (API/Excel sheet/CSV) to your staging table.

 

I am also assuming that the table structure you have shared is of your staging table.  Here the Type field can be used to segregate data for Incident, Change and problem tables.

 

In your data source, you will be having three different transform map, where source would be your staging table and target would be either Incident, problem or change.

 

Let's assume you are writing your first transform map for incident table.

 

Screenshot 2023-09-20 at 9.43.29 PM.png

Here is the configuration for the transform map onBefore script.

Screenshot 2023-09-20 at 9.45.40 PM.png

In the above script, we are simply checking if the type on the source field is incident, if the condition evaluates to true then we set the ignore action to false otherwise true. This makes the script to run only for those records where type is incident.

 

Similar transform maps can be created for change and problem records and similar onBefore script for change and problem types can also be put.

 

For more information on Transform map, I recommend you reading the official documentation here. 

 

https://docs.servicenow.com/bundle/tokyo-platform-administration/page/script/server-scripting/concep...

 

https://docs.servicenow.com/bundle/tokyo-platform-administration/page/script/server-scripting/refere...

 

Hope this helps.

hi 

i use the same script in my robust transform.44332211