How to access the total field in sys_import_set_run(Transform History) table?

SNOW Developer6
Tera Contributor

Hi,

I am working on a script on import set table.

I am just querying the import set loaded yesterday and today and printing the details of todays record.

I am trying to access the total field from sys_import_set_run table but its not working.

 

Can u please look at my script and help me with it?

 

Thanks

 

 

 

var iset_today = new GlideRecord('sys_import_set');
iset_today.addEncodedQuery('sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()');//import sets loaded today
iset_today.query();
var loadRunTimeToday =[];
var loadCompletedToday = [];
var todayIsetNumber = [];
var todayDataSource = [];
var today_total = [];
var todayDisplayValue = [];

while(iset_today.next()){
        loadRunTimeToday.push(iset_today.getValue('load_run_time'));
        loadCompletedToday.push(iset_today.getValue('load_completed'));
        todayIsetNumber.push(iset_today.getValue('number'));
        todayDataSource.push(iset_today.getDisplayValue('data_source'));

        var iset_run_today = new GlideRecord('sys_import_set_run');//Transorm history table
        iset_run_today.addQuery('set.number',iset_today.getValue('number'));
        iset_run_today.Query();
        while(iset_run_today.next)
        {
          today_total.push(iset_run_today.getValue('total'));
        }

        
  }
gs.info("Today import set");
gs.info(todayIsetNumber);
gs.info(todayDataSource);
gs.info(loadRunTimeToday);
gs.info(loadCompletedToday);
gs.info(today_total);
gs.info(todayDisplayValue);

 

 

0 REPLIES 0