cancel
Showing results for 
Search instead for 
Did you mean: 

Error while importing data from excel file to SAP HANA Studio?

Former Member
0 Kudos

Hi Experts,

While loading data from excel file to HANA studio i am getting below error. I am trying to load Arabic data into table.

Batch from record 2 to 28 failed: For input string: "Jul": For input string: "Jul"

java.lang.NumberFormatException: For input string: "Jul"

  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:60)

  at java.lang.Integer.parseInt(Integer.java:461)

  at java.lang.Integer.parseInt(Integer.java:511)

  at java.sql.Date.valueOf(Date.java:221)

  at com.sap.ndb.studio.bi.filedataupload.deploy.populate.PopulateSQLTable.populateTable(PopulateSQLTable.java:93)

  at com.sap.ndb.studio.bi.filedataupload.ui.job.FileUploaderJob.uploadFlatFile(FileUploaderJob.java:199)

  at com.sap.ndb.studio.bi.filedataupload.ui.job.FileUploaderJob.run(FileUploaderJob.java:61)

  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Please let me know what might be the issue ?

Thanks&Regards

Sudha

Accepted Solutions (1)

Accepted Solutions (1)

former_member183326
Active Contributor
0 Kudos

Hello Sudha,

This error is indicating that in HANA Studio it is expecting to see a Integer (Number) rather than a word (Jul) Check the Jul string to see if this should be a integer rather than a letter.

Please also reproduce the issue whilst running this trace:

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') SET ('trace', 'debuggingbackend') = 'debug' WITH RECONFIGURE;

Then please reproduce the issue and disable the trace afterwards again with the following command:

ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini', 'SYSTEM') UNSET ('trace', 'debuggingbackend') WITH RECONFIGURE;

If you could attach or copy the relevant line to the thread so we can get a better understanding of the error.

BR

Michael

Former Member
0 Kudos

Hi Michael,

Thanks for the reply. actually its a date field and the value in excel is "7/18/1988" so it is coming as "Jul" instead of 7.

which format i should consider for because i tried different date formats but still i am getting the same error.

Thanks

Sudha

former_member183326
Active Contributor
0 Kudos

Hello Sudha,

Looking at the format, maybe this will not have any impact, but you could try placing a zero in front of 7? ie: 07/18/1988?

Also, if you run the trace we can see in more detail what the error is.

Thanks,

Michael

Former Member
0 Kudos

Hi Micheal,

Date format issue is resolved. i got one more issue with my data, actually i am trying to load 91MB excel file into HANA database into single table.

It is throwing below error

java.lang.OutOfMemoryError

  at java.util.Arrays.copyOfRange(Arrays.java:4078)

  at java.util.Arrays.copyOf(Arrays.java:3810)

  at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:147)

  at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource$FakeZipEntry.<init>(ZipInputStreamZipEntrySource.java:113)

  at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:55)

  at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:83)

  at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:267)

  at org.apache.poi.util.PackageHelper.open(PackageHelper.java:39)

  at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:204)

  at com.sap.ndb.studio.bi.filedataupload.filereader.XLSXFileReader.initialise(XLSXFileReader.java:104)

  at com.sap.ndb.studio.bi.filedataupload.filereader.XLSXFileReader.getAllWorkSheets(XLSXFileReader.java:115)

  at com.sap.ndb.studio.bi.filedataupload.deploy.FileUploaderImpl.getExcelWorkSheets(FileUploaderImpl.java:254)

  at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.ImportFileSelectionWizardPage$1.widgetSelected(ImportFileSelectionWizardPage.java:192)

  at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)

  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)

  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)

  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)

  at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)

  at org.eclipse.jface.window.Window.open(Window.java:808)

  at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:158)

  at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)

Is there limitation in HANA regarding size of file or number of rows?

Thanks&Regards

Sudha

former_member183326
Active Contributor
0 Kudos

Hello,

May I ask how did you sort the format issue?

Also, what is the total memory of the HANA system?

What size is the table is the table you are loading into?

Have you tried increasing the Global Allocation Limit?

BR

Michael

Former Member
0 Kudos

Hi Micheal,

1. I have given Datatype for date as NVARCHAR and loaded into Hana DB. i was struggling whole day to convert this but which ever format i take in excel it is coming as text for month in HANA. so i loaded as it is into HANA DB. while creating IDT i will user data format function to convert so that it would be ok.

as you told i tried to change it to "07/18/1988" but in hana still it is coming month as "jul". i dont know whats wrong with this date format. we never faced these kinda difficulty in BW.

2. I am unable to find Hana DB size because i am not authorized to check it. i am loading 91MB data from excel sheet which contains 21 column fields. I am not sure how to load this huge file into HANA. i will contact administrator regarding this and see whether he can provide some solution.

BR

Sudha

former_member183326
Active Contributor
0 Kudos

Hello Sudha,

Can you see anything in the indexserver files that can give us a better understanding of the error?

BR

Michael

Former Member
0 Kudos

Hi Michael,

Good Morning!!

I found below post it tells work around for loading larger files. i am not sure about HANA AWS and also how to proceed with it.

http://scn.sap.com/community/developer-center/hana/blog/2012/12/07/how-to-load-a-flat-file-using-aws...

Kindly help me on this.

Thanks

Sudha

Answers (0)