Data Sources, Troublshooting import sets

sLuintel
Giga Expert

My import set shows that it is complete and has created the data source but not loaded the data. when I tryt o manually load it i get an error.

What does this error message mean?

IOException on file /glide/nodes/mhp001_16007/bin/../tmp/ids313285452ba6e50052ad4c7605da15fd.tmp, Invalid header signature; read 724303750490253372, expected -2226271756974174256

11 REPLIES 11

adiddigi
Tera Guru

you are trying to load a CSV marking the Data Source file format as XLS



Or, trying to load an XLS marking the Data Source file format as CSV



In any case, use a new import set table...


Hi


The data is coming from Oracle. I have asked the ouput to be a .xls file, and set everything else withing servicenow to be excel also.


The issue is: when it is automatically coming in from oracle I get the error message above, it had put itself in a data source but not loaded the data. However, when I take that same file and save it as .xls and then import it it work absolutely fine.


Oracle have ensured me that it is a .xls file and I can also see on the attachment that it is a.xls file. when they email me the output to my personal email i can see that it is a .xls file.


Somehow service now is failing to read that automated email form oracle as an .xls, even though I see that it is.


Would you know why this would be?



Thank you.


Sweeda.


sLuintel
Giga Expert

Hi is there a way where I can add a piece of code or something that will tell the POI to read the file as .xls. Here is my inbound action:


gs.log('INBOUND CONDITION 1 HIT','SUPPLIERS');


if (current.getTableName() == "sys_data_source") {  




      gs.log('INBOUND CONDITION 2 HIT','SUPPLIERS');


      current.name = email.subject.substring(9);  


      current.import_set_table_label = 'supplier_data_loadv1';  


      current.import_set_table_name = 'u_supplier_data_loadv1';  


      current.file_retrieval_method = 'Attachment';  


      current.format = 'Excel';  


 


      current.update();  


 


      var r = new RESTMessage('Inbound Import Set Poster', 'get');  


      r.setStringParameter('tableLabel', encodeURIComponent(current.name));  


      r.setStringParameter('customDataSource', current.sys_id);  


      r.setStringParameter('tableName', current.import_set_table_name);  


      r.execute();  


} event.state="stop_processing";


That little bit of code you may have gotten from my blog at: UPDATED - Use an email with an attachment to create a Data Source, Load Data, and Run Transform but that should read it as an excel spreadsheet when the data source loads it.