GlideImportSetTable - Scoped, Global

concept australia Updated Sep 10, 2026 2 min read GlideImportSetTableAPI.md
Raw file servicenow.com

The GlideImportSetTable API provides methods to create temporary Import Set tables.

These methods create the Import Set table using a dynamic, standard naming convention. Tables must have at least one defined column. Modification and deletion of existing Import Set tables is not supported.

A scheduled job named Scripted Import Set Deleter runs every seven days by default. Scripted Import Set Deleter deletes all Import Sets, Transform Maps, Transform Entries, and drops the Import Set Tables associated with the tables created by this API.

You can use the GlideImportSetTable methods in global and scoped scripts. Use the sn_impex namespace identifier to create a GlideImportSetTable object.

Parent Topic:Server API reference

Related topics

GlideImportLog

GlideImportSetRun

GlideImportSetTransformer

GlideImportSetTransformMap

GlideTransformLog

GlideImportSetTable - GlideImportSetTable(String tableLabel)

Instantiates a GlideImportSetTable object.

Name Type Description
tableLabel String Label of the Import Set table created upon calling the create() method.
JavaScript
var importSetTable = new sn_impex.GlideImportSetTable("temp user table");

GlideImportSetTable - addDateTimeColumn(String columnLabel)

Creates a GlideDateTime column.

Name Type Description
columnLabel String Label of the GlideDateTime column to create in the Import Set table.
Type Description
void
JavaScript
var importSetTable = new sn_impex.GlideImportSetTable("temp user table");importSetTable.addDateTimeColumn('start date');var tableStructure = importSetTable.create();

GlideImportSetTable - addStringColumn(String columnLabel, Number length)

Creates a string column.

Name

Type

Description

columnLabel

String

Label of the string column to create in the Import Set table.

length

Number

Optional. Maximum column length. Default: 40 characters

|Type|Description| |----|-----------| |void| |
JavaScript
var importSetTable = new sn_impex.GlideImportSetTable("temp user table");importSetTable.addStringColumn('first name', 50);importSetTable.addStringColumn('last name', 50);var tableStructure = importSetTable.create();

GlideImportSetTable - create()

Creates the Import Set table.

Name Type Description
None

Type

Description

Object

JSON object in the following format:- tableName: String. Database name of the table.

  • tableLabel: String. User-friendly label of the table (rewriteable).
  • columns: Object. Map of table column labels to column names provided by the addDateTimeColumn() and addStringColumn() methods.
    • column_label: String. Label of the string column in the Import Set table.
    • column_name: String. Name of the string column in the Import Set table.
CSS
{"tableName": "<table_name>", "tableLabel": "<table label>", "columns": StringMap(<column_label>: <column_name>)}
``` // Create Import Set table var importSetTable = new sn_impex.GlideImportSetTable("temp user table"); importSetTable.addStringColumn('first name', 40); importSetTable.addStringColumn('last name', 40); importSetTable.addDateTimeColumn('start date'); var tableStructure = importSetTable.create();

/* tableStructure = { "tableName": "imp_staging_table_1417601730000", "tableLabel": "temp user table", "columns": { "first name": "u_first_name", "last name": "u_last_name", "start date": "u_start_date" } } */

var importSetTableName = tableStructure["tableName"]; var columns = tableStructure["columns"];

Text

Search documentation
Search document titles and file paths on the australia branch