[Data Source] Aborting to create import set in some conditions

Filip Pawelec
Tera Contributor

Hello,

 

I am using Data Source type REST (IntegrationHub) with format: Custom (Parse by Script) and Request action. I am fetching the data from customer every 5 minutes, and if the response has 0 fields changed, I would like to abort the import set creation.

Right now I have tons of processed import sets with Error log: Loading import set table with error: <name of the import set table>. 

 

Do you know, if it is possible to do? I've checked docs, and tried solutions like ignore = true; but it didn't work.

 

Thanks in advance 🙂

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Filip Pawelec 

if there is no field change the rows will be marked as ignored

It won't mark it as error.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

What do you mean? When I am not assigning result to anything, or just empty array [], it still create import set record and I've got "Complete with errors" state.

 

I've checked docs, and there is suggestion to use result.setSkip(true); but it also doesn't work. The error is the same.

 

In logs there is another error:
com.glide.db.impex.splitbyline.SplitByLineStreamLoader: com.glide.db.impex.datasource.stream.StreamDataSourceException: No fields provided for mapping to headers