Lessons › Domain 5: Working with External Data (10%) › Lesson 17
Importing CSV and Excel Data
About 15 minutes · Last checked against the CAD blueprint (January 2026): 4 December 2026
Step 1 · Learn
Loading spreadsheets into application tables
Imports load data from a file or another source into a staging table first, then transform it into the target table. This keeps bad data out of your application until you are happy with the mapping.
The steps
- Load Data: choose the file (CSV or Excel), or a data source, and an import set table. The platform creates the staging table and loads the rows.
- Create a transform map from the import set table to the target table.
- Map fields. Auto Map Matching Fields maps fields whose names match; Mapping Assist lets you drag the rest.
- Set coalesce on the field or fields that identify an existing record.
- Run the transform and check the import log.
Coalesce
When a field is set to coalesce, the transform looks for a target record with the same value. If it finds one, it updates it; if not, it inserts a new record. Without any coalesce field, every row is inserted, which creates duplicates on a second import.
Transform scripts
Transform scripts run at set moments, such as onStart, onBefore, onAfter and onComplete. They use source for the import row and target for the record being written. Setting ignore = true in onBefore skips a row.
Data sources
A data source describes where data comes from, such as a file, a JDBC database, LDAP or a REST endpoint. Scheduled data imports run a data source and its transform on a schedule.
Step 2 · Do
Import Acme's equipment list
Facilities keeps the equipment list in Excel. Import it into the equipment table, and keep it updated weekly. This is a practice environment of our own design, not the ServiceNow product. Complete the tasks in the task list.
Step 3 · Check
Exam-style questions
Select an answer and check it. Every answer includes an explanation.