Import Set Transform Fails with "Transaction cancelled: maximum execution time exceeded" Due to Calculated Field Dot-Walk Reference ResolutionIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } An import set transform on a scoped application table fails partway through processing with the error:"Import set: <ISET Number> transform stopped due to error: Transaction cancelled: maximum execution time exceeded" Only a portion of the staged records are transformed successfully. The remaining records stay in "Pending" state with no target record, even though all rows were loaded into the staging table without error. Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } • The import set run shows a status of "complete_with_errors."• The staging table contains all expected rows, but a subset remains in "Pending" state with Updates = 0 and no Target Record.• The transaction log shows excessive total transaction time (approaching or exceeding the platform's maximum execution time limit, typically ~5 minutes).• SQL time dominates the transaction — for example, 4+ minutes of SQL out of a ~5-minute total.• The slow query log or DBTrace entries show a repeating SQL query taking 20–30 seconds per execution, fired once per record during the transform.• Thread stack traces captured by the memory watcher show a call path through: CalculatedFieldEvaluator.safeEvaluate → GlideRecord.calcVirtualFields → GlideElementReference.getByDotWalk → ScopedGlideRecord.jsFunction_query.• Setting "Run business rules" to false on the transform map does not resolve the issue. Facts<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } • Platform: ServiceNow (any release)• Database: RaptorDB/Postgres or MariaDB• The target table has one or more calculated (virtual) fields — fields where the "Calculated" attribute is set to true in the dictionary (sys_dictionary).• These calculated fields use dot-walk expressions to resolve reference fields in their calculation scripts (e.g., current.reference_field.child_field).• The transform map's "Run business rules" setting does not affect virtual/calculated field evaluation. Calculated fields are evaluated at the platform level during record loading and caching, regardless of this toggle.• The issue scales with volume — smaller batches may complete while larger batches exceed the transaction time limit. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All Releases Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } When the transform map processes each record, the platform updates the target record and loads it into the record cache. During this process, any calculated (virtual) fields on the target table are evaluated. If these calculated fields contain dot-walk expressions (e.g., current.invoice_summary.billing_amount_currency), the platform must: 1. Resolve the reference field (e.g., invoice_summary) by querying the referenced table.2. Load the referenced record into the record cache, which triggers virtual field evaluation on that record as well.3. Execute any further queries needed to satisfy the dot-walk chain. This creates a cascading query pattern where each record in the transform triggers multiple expensive SQL queries. If any table in the reference chain has a missing or inefficient database index, the individual query execution time can be very high (e.g., 20–30 seconds per record). Since the transform processes records sequentially within a single transaction, the cumulative SQL time grows linearly with each record and eventually exceeds the platform's maximum transaction execution time, causing the transaction to be cancelled. The remaining unprocessed records in the staging table are left in "Pending" state because the transform never reached them before the transaction was terminated. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } This issue is caused by the design of calculated fields and/or missing indexes on application-specific tables, which falls outside the scope of ServiceNow Technical Support when the tables belong to a scoped or custom application. The application development team should: 1. Identify calculated fields on the target table: Navigate to sys_dictionary.list, filter by Table = [target table] and Calculated = true. Review the Calculation script for dot-walk expressions through reference fields. 2. Optimize the calculated field scripts: a. Replace dot-walk expressions with stored/denormalized values where possible. b. If the calculated value does not need to be recomputed on every record load, consider converting it to a regular field populated via a business rule on insert/update instead. c. Minimize the depth of reference chains in calculation scripts. 3. Add missing database indexes: Check sys_index.list for the tables involved in the reference chain. Ensure that columns used in JOIN conditions (especially foreign key columns like reference fields) are properly indexed. 4. Immediate workaround — Re-run the transform for the pending records: If the remaining pending records are still in the staging table, re-running the transform will process only those records. With a smaller batch size, the transaction should complete within the time limit. 5. Long-term workaround — Reduce batch size: Until the root cause is addressed, split bulk uploads into smaller batches (e.g., 20–25 records) to keep the cumulative transaction time below the platform limit. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Related Links:• KB0534136 - Transaction cancelled: maximum execution time exceeded• KB0690480 - How to Troubleshoot Slow Transactions• ServiceNow Docs - Import Sets and Transform Maps: https://docs.servicenow.com/bundle/latest/page/script/server-scripting/concept/c_ImportSetsAndTransformMaps.html• ServiceNow Docs - Calculated Fields: https://docs.servicenow.com/bundle/latest/page/administer/table-administration/concept/c_CalculatedFields.html