Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Executes a Transform Map on the given Import Set.

When working with Import Sets and Transform Maps in ServiceNow, it’s common to automate data transformation after a Data Source load completes.
This script simplifies that by programmatically running the Transform Map using the GlideImportSetTransformerWorker API.

Fetches the Transform Map sys_id from the property tmap.tag.sys.id
Transforms data from the specified Import Set into the target table
Runs the transformation asynchronously (in the background)
Pass the importset SysId from flow inputs after trigger the datasource
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
triggerTransform: function(importSetRecSysID) {

var transformSysId = gs.getProperty('tmap.tag.sys.id'); // store the sys_id of transform map

var transformWorker = new GlideImportSetTransformerWorker(importSetRecSysID, transformSysId); // Calling OOB method to run transform map pass the importset sysId
transformWorker.setBackground(true); // run asynchronously
transformWorker.start();
}
Loading