cancel
Showing results for 
Search instead for 
Did you mean: 

Error while importing data from local csv file using HANA Studio

hardik_patel
Participant
0 Kudos

Hi Experts,

While trying to import data to an existing table in HANA from a local CSV file using HANA Studio, I am getting following error message. I have made sure there's nothing wrong with data (or data types) in the file that I am trying to import. In fact, I tried to import data to multiple tables and ended up with same error message. I am running SAP HANA SP5 Revision 48 and HANa Studio 32bit Version:1.0.48 Build id: 201301130825 (372847)

Message :

Batch from Record 2 to 4622 Failed: SAP DBTech JDBC: Cannot convert Java type java.io.InputStream to SQL type CHAR.: SAP DBTech JDBC: Cannot convert Java type java.io.InputStream to SQL type CHAR.

com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot convert Java type java.io.InputStream to SQL type CHAR.

at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:363)

at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateSQLException(SQLExceptionSapDB.java:146)

at com.sap.db.jdbc.translators.DBTechTranslator.newSetException(DBTechTranslator.java:1044)

at com.sap.db.jdbc.translators.StringTranslator.transBinaryStreamForInput(StringTranslator.java:333)

at com.sap.db.jdbc.CallableStatementSapDB.setBlob(CallableStatementSapDB.java:2954)

at com.sap.db.jdbc.trace.PreparedStatement.setBlob(PreparedStatement.java:269)

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

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

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

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

Please help me resolve this issue

Thanks,

Hardik

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Hardik,

     I know that data loading is a tedious and monotonous job, and you may make an unnoticed error here and there.

Looking at the log, it appears as if its a data type mismatch. You can try a few things though

     a. Use NVARCHAR instead of VARCHAR.

     b. Check for NOT NULL/UNIQUE condition in table and corresponding data in CSV files.

     c. Try with a smaller dataset of 10-20 records and try to debug the error.

Thanks,

Shreepad

Former Member
0 Kudos

Hi and thks

i've had the same issue and changing the data type char to nvarchar the load was fine.

Regards, Jaime

Former Member
0 Kudos

Hi Hardik,

Have you followed this link http://scn.sap.com/docs/DOC-27960 and doing exactly the way it says... ?

Hope it helps...

Regards,

Papil

Former Member
0 Kudos

Hi Papil,

Hardik was trying to help me out resolve the issue posted here.

Yes. I have followed same steps that are described in the article. Import wizard goes well till the end. After I click Finish (Step 7 in the article), the import job runs and fails with the error message given in the original post above.

Please note, I am running SAP HANA SP5 Revision 48 and HANa Studio 32bit Version:1.0.48 Build id: 201301130825 (372847)

Thanks,

Hitesh

former_member184768
Active Contributor
0 Kudos

Hi Hitesh,

Is it possible for you to post some sample data and the table structure for better understanding.

Regards,

Ravi