Exclude a table from Import Set Cleaner

Manohar Reddy
Tera Contributor

Hi Team,

 

I want to exclude a table from Import Set cleaner Scheduled Job. I have taken a copy of the OOB Script Include "ImportSetCleanerCustom" and added "table_name!=MY_TABLE_NAME" query to  '_queryIsets' function. But somehow it is not working. Can someone please help me on this. 

 

Thanks In Advance.

4 REPLIES 4

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,

Can you please share your script?

 

 


Thanks and Regards,

Saurabh Gupta

Hi @ersureshbe @Saurabh Gupta  

 

Below is the OOB Script Include link

https://instancename.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=bb8aed770a0a0b120053...

 

in "_queryIsets" function I filtered out my table and somehow it is not working.

Hi,

You can try below change the function/method "_tableClean" as below--

  
   _tableClean : function(table, query) {

if(table=='your_table_name')
return;
      var tc = new GlideTableCleaner(table, this.daysAgo*86400000, 'sys_created_on');

      if (query)
        tc.setConditions(query);

      tc.clean();
   },

 


Thanks and Regards,

Saurabh Gupta

ersureshbe
Giga Sage
Giga Sage

Hi, can you share the code what you implemented to review?

Regards,
Suresh.