N
N
n_zubov2017-04-12 16:58:50
SAP
n_zubov, 2017-04-12 16:58:50

How to upload a csv file to an existing table using Development Tools SAP HANA Web-based Development Workbench?

How to upload a csv file to an existing table using Development Tools SAP HANA Web-based Development Workbench?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Nozdrin, 2017-04-14
@anozdrin

You can try using export-import. First, export the table (in zip - it drags triggers, keys and everything else), then pull the data file out of the zip, add the necessary csv lines there, put it back in the zip to the same place and import with replacing the old one. And the easiest way is to connect with Eclipse (Khana Studio) to the cloud source and at the same time Access or Excel via ODBC and write anything there in the most convenient way. In my case, the host address for odbc is localhost:30315 - well, you can see it in eclipse - it forwards the tunnel.

K
kengur8, 2017-05-30
@kengur8

Create a .hdbti file
import = [{
table = "";
schema = "";
file = "package:file.csv";
header=false;
delimField = ";";
}];
.xsaccess {"exposed" : false}
When the package is activated, the csv will be loaded into the table

V
Vest, 2017-09-10
@Vest

There is also a quick-and-dirty solution. It helps in cases where the CSV is too large, and Hana doesn’t like something in it - this is to generate a column from INSERT (or UPSERT) commands through Excel. Something like INSERT INTO ...
Don't forget COMMIT or ROLLBACK at the end. Of the possible errors with CSV import, look out for decimal separators, quotation marks and the appearance of delimField in text columns, as well as duplicate keys.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question