What This Table Is
The sys_transform_map table stores the configuration for Import Set transformations, acting as the bridge between raw imported data and ServiceNow's structured tables. Each record defines how data from a specific import set table should be mapped, transformed, and inserted into a target table like incident or cmdb_ci_server. This is the master configuration that orchestrates the entire data transformation process.
Transform Maps belong to the Integration module and support ServiceNow's ETL (Extract, Transform, Load) process end-to-end. The workflow starts with importing raw data into an import set table, then applying the transformation rules defined in this table to create or update records in the target table. Each transform map contains field mapping rules (sys_transform_entry), transformation scripts, and error handling configurations.
This table doesn't extend any parent table but serves as the parent configuration for sys_transform_entry records (individual field mappings) and sys_transform_history records (execution logs). The relationship is hierarchical: one transform map has many field mappings and generates multiple execution history records over time.
In large enterprises, this table typically contains 50-500 transform map records, with each map processing thousands to millions of import records over time. Performance is generally good since transform maps themselves are just configuration metadata. However, the transformation scripts within these maps can become performance bottlenecks when processing large import sets, especially if they contain complex lookups or create multiple related records.
When You'll Script Against This Table
You'll typically script against sys_transform_map in Script Includes that manage data integration workflows, Business Rules that trigger transformations based on import set status changes, and Scheduled Scripts that run periodic data imports. Integration administrators and developers with the import_transformer role can read and modify transform maps, while the import_admin role has full control.
Most scripting occurs in Transform Scripts (onStart, onBefore, onAfter, onComplete) that are stored as fields within the transform map record itself. These scripts execute in the global scope and have access to special variables like source (import set record), target (destination record), and import_set (import set header record).
Common scripting patterns:
- Programmatically trigger transform map execution using
TransformUtil.transformAllMaps()orTransformUtil.runTransform() - Query transform maps to build dynamic integration dashboards showing success rates and error counts
- Create or clone transform maps programmatically when building integration configuration UIs
- Modify transform map settings based on data source characteristics or business rules
- Implement custom error handling by querying failed transform attempts and retry logic
- Build integration monitoring alerts by checking transform map execution status and timing
- Export and import transform map configurations between instances for deployment automation
Table Gotchas
Transform maps with run_business_rules=true can cause unexpected cascading effects. Business Rules on the target table will execute for every transformed record, potentially triggering notifications, workflows, or additional data changes you didn't anticipate.
The coalesce_empty_fields setting is counter-intuitive. When true, it treats empty strings as NULL for coalescing purposes, but when false, empty strings are treated as actual values that can block updates to existing records.
- The
source_tablefield only accepts tables that start with 'u_' (import set tables). Attempting to set it to a regular table will fail silently during transformation - Transform scripts execute in a specific order: onStart → field mappings → onBefore → record insert/update → onAfter → onComplete. Modifying the
targetrecord in onAfter won't trigger another update
Performance degrades exponentially with complex onBefore/onAfter scripts that do database lookups. Each script runs once per source record, so a script with 5 GlideRecord queries processing 10,000 import records executes 50,000 database queries.
- The
activefield controls whether the transform map executes, but deactivated maps still appear in transform lists and can cause confusion. Always checkactive=truewhen querying for operational transforms - Cloning transform maps via
GlideRecord.insert()doesn't copy the associatedsys_transform_entryrecords. Use the Transform Map API or manually clone the field mappings
Enjoying this? Get one deep-dive per week.
Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.
Related Tables
The sys_transform_entry table stores individual field mappings for each transform map, creating a one-to-many relationship where each transform map has multiple field transformation rules. You'll frequently join these tables when building or analyzing transformation logic. The sys_import_set table tracks import execution batches and links to transform maps through the transform_map reference field.
The sys_transform_history table logs every transformation attempt, success, and failure, making it essential for monitoring and debugging integration issues. You'll also commonly query the actual import set tables (prefixed with 'u_') that serve as the data source, and the target tables (like incident, cmdb_ci, or sys_user) where the transformed data ultimately lands. This creates a data flow chain that developers must understand to troubleshoot integration problems effectively.