cancel
Showing results for 
Search instead for 
Did you mean: 

Truncate table and mass upload with CAP

hh
Explorer
0 Kudos
155

Hello everyone,

I want to replicate a table with CAP. The entire table is to be “copied” with each run. This means that I first have to delete all entries from the target table and then write all rows from the source table to the target table.

If I do this with the standard CRUD operations, it takes quite a long time (there are approx. 165000 rows in the table).

Is there a possibility to do a “TRUNCATE” on the DB table and then a “mass upload”?

Many thanks and best regards
Heinrich

View Entire Topic
hh
Explorer
0 Kudos

if anyone is looking for the same problem. With a short hint of @alperdedeoglu i get a solution with hana stored procedures.
you can find a tutorial for it here: https://developers.sap.com/tutorials/hana-cloud-cap-stored-proc..html

BR

Heinrich

akuller
Participant
0 Kudos
Hi @hh the better question is, why delete everything? What is the use case? I can think of several possibilities that are more efficient.
hh
Explorer
0 Kudos
Hi @akuller, yes that is not the most efficient way in the sight of performance, but in this case it was the requirement 🙂