Import set and Transform Maps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
I have a sheet which have four records ( 2 incidents and 2 foreign incidents(custom table)) , now I need to use that sheet and import it to two different tables, how can I do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @go0thamsrec
To import data in more than one target table use Robust Transform Map
Follow below Links:
Robust Import Set Transformers
Standard transform map vs Robust transform map
Mark it as 'helpful' if it really helps you
Thanks,
Harsh Raghav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday - last edited Thursday
Step 1. Create a single Data Source
Step 2. Add an identifier column in Excel
Make sure your Excel has a column that identifies the type of record, e.g.:
table - number - short_description
| incident | INC001 | Network down |
| foreign_incident | F-INC001 | Partner issue |
Step 3. Create Two Transform Maps
1. Transform Map 1 → Incident
Target table: incident
Add condition:
if (source.type != 'incident') {
ignore = true;
}
You can add these in the "Run script" field of the Transform Map (Before Transform Script), or use a Transform Script (OnBefore / OnStart).
2. Transform Map 2 → Foreign Incident
Target table: u_foreign_incident
Add condition:
if (source.type != 'foreign_incident') {
ignore = true;
}
Regards,
Cheikh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
1 data source can have multiple transform maps 1 for each table
what did you start and where are you stuck?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0749267
I would recommend using Robust Transform Map if you are using same staging table to load data to multiple target tables. If you have not used Robust Transform, you can still use normal transform maps but would recommend using 2 staging tables and 2 transform maps as part of the data load.
You can use onStart or onBefore transform event scripts to control what data is loaded to staging table or mapped from staging table to target table based on your requirements. This would avoid creation of incident records in foreign incidents table and vice versa.
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
