cancel
Showing results for 
Search instead for 
Did you mean: 

.hdbtabledata deletes data in deployment

In our MTA project, we are using .hdbtabledata and .csv files to populate some of the tables with initial data. Those tables are afterwards being populated by our applications with new data. It used to work fine, we had several deployments, and everything was OK. However, after the last deployment, we have lost all other data from those tables, apart from the data provided by csvs.

We investigated the Key-Reservation Import Scenario andImport Column Scenario provided in HANA Developer Guide, but none of them seems to fulfill our requirement - to import some initial data by first deploy of application, and then to populate the same tables with new data without fear that data could be lost by the next deployment.

Any recommendations about this?

draschke
Active Contributor
0 Kudos

Hi Olja,

we made the same experience in a lot of different projects. I wrote also a post for a while ago, but nobody has answered it since that time. It's such a strange behavior! Did you find something?

https://answers.sap.com/questions/554067/sap-hana-xsa-hdbdatatable-tables-are-empty.html

If we don't find the reason soon, we need to stop to use them. 😞

BR, Dirk

0 Kudos

Hi Dirk,

Thank you for your answer. I think we experience almost the same issue as you do. At the time I wrote this question, we had problem explained there, and after that we decided not to use .hdbtabledata anymore. We switched to manual initial inserts via sql scripts. That worked just fine until few days ago.

Now, during deploy of one change in hdb module (we added unique constraints in some tables), we lost data in tables that were
previously populated by .hdbtabledata file. Not all data from those tables were lost, but only data that was inserted by our application, while data from (deleted) csv files remained in tables.

That made us think that .hdbtabledata is not really deleted from hdb module, so we undeployed it like you did.

Now we are on the same page with you - during deploy all data is lost (data from csv files + data inserted by app).

We are chasing for solution there. If you find something, please let us know too. 🙂

Regards,

Olja


draschke
Active Contributor
0 Kudos

Hi Olja,

to clarify this issue, I have opened a ticket some days ago. (Still waiting for an answer...). If I find something, I'll let you know!

BR, Dirk

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You say the key reservation import doesn't work for you. How so? That is the mechanism provided to be able separate the imported data area from other data that isn't to be touched via some key specification. You might need to add another column to your table definition in order to supply this difference.

0 Kudos

Hi Tom,

Thank you for your answer.

We decided not to use .hdbtabledata file, as it seemed too risky for us after data loss.
However, as described in my answer to Dirk, we experienced data loss again, even without using that file.

We also undeployed the file, which made distinction that after deploy all data from those tables were lost, and not only data inserted by application.

How comes that? If there is no .hdbtabledata file anymore, where is the reference to delete data from tables that were previously populated by that file?

And one more strange thing. We had many many successful deployments of hdb module without data loss. Only when we added unique constraints to technical configuration of some of the tables inside .cds file, data loss has occured. How comes that?

Thank you for all of your answers! 🙂

Best Regards,

Olja

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Then I strongly suggest you enter a support ticket with all the relevant information.