- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2016 10:04 AM
Hi All,
We have a datasource set up which runs and create new ISET num on daily basis in import set table.
Is there a way I can query the import set table to get the latest one created by my datasource and then transform the data to a existing SNOW table?
Can someone please help with how to script this may b using an UI Action?
Thanks
Subhara
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 06:23 AM
Please re-review my Consumerize data load blog entry. My code includes updating the import set rows with the task number after processing the data source and before running the transform:
// Process excel file
var loader = new GlideImportSetLoader();
var importSetRec = loader.getImportSetGr(current);
var ranload = loader.loadImportSetTable(importSetRec, current);
importSetRec.state = "loaded";
importSetRec.update();
// Update processed rows with task sys_id
var importSetRow = new GlideRecord(importSetTableName);
importSetRow.addQuery("sys_import_set", importSetRec.sys_id);
importSetRow.query();
while (importSetRow.next()) {
importSetRow[importSetTaskIDFieldName] = producer.task_number;
importSetRow.update();
}
// Transform import set
var transformWorker = new GlideImportSetTransformerWorker(importSetRec.sys_id, transformMapID);
transformWorker.setBackground(true);
transformWorker.start();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 07:00 AM
Thanks Michael.
One basic question -
The import set table that we create , will that also get cleared like other import set tables in 7 days??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 07:29 AM
Yes it should get cleared automatically. Though you can configure that behavior too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2016 11:06 AM
Hi Michael,
I want to show a message once the load is completed. But if i write in the UI Action itself to check the sys_import_set table and see if the state is processed it dont work, it shows the state as loaded there.
Is there a way we can achieve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2016 11:09 AM
Unfortunately the load is happening via background process so you cannot show a message in the foreground to the use that the load is complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2016 11:15 AM
Thanks. This helps.