- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 01:34 AM
Is there any API which returns the list of staging tables (Both Default and Custom ones) ?
How can I differentiate between a normal custom table and a staging custom table?
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 02:19 AM
Hello Rohit,
You can look for the tables that have sys_import_set_row as super class.
This is an example of a background script that you can run to get all the staging tables:
var stagingTables = new GlideRecord('sys_db_object');
stagingTables.addQuery('super_class.label', 'Import Set Row');
stagingTables.query();
while(stagingTables.next()){
gs.print(stagingTables.name);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 02:17 AM
Hi Rohit,
You simply cannot differentiate the difference, however if you type import in the application navigator search box you will see the import set tables under system import set, these are the staging tables as we say. You can delete them by using the clean up tool which is under it. The list shows only those tables which are created manually while importing data, however since you are an admin you should always omit deleting the integration staging tables.
You can also refer to http://wiki.servicenow.com/index.php?title=Import_Sets for further information.
Regards,
Ayan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 02:19 AM
Hello Rohit,
You can look for the tables that have sys_import_set_row as super class.
This is an example of a background script that you can run to get all the staging tables:
var stagingTables = new GlideRecord('sys_db_object');
stagingTables.addQuery('super_class.label', 'Import Set Row');
stagingTables.query();
while(stagingTables.next()){
gs.print(stagingTables.name);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 02:35 AM
Thanks Edwin and Ayan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2015 02:50 AM
Also sys_db_object table returns the rotation tables also, how can I skip the rotation tables from the response?