cancel
Showing results for 
Search instead for 
Did you mean: 

How manage data in Hana tables?

alikhach
Explorer
0 Kudos

We created a new table using .hdbtable artifact. Added test data in it and found that the name of one field is incorrect.

I've changed the field name and Build my project. What i found? All data from old filed are disappeared and new field was in the middle of the table before, now it stands at the end.

Is there any possibility to keep field sequence the same as it in the .hdbtable is.

And what to do with existing data and do not lose it every time, when we change something?

alikhach
Explorer
0 Kudos

And what about existing data. If we have something on production and decided to change field description, then we need to drop the table and create it again....and loose everything? Nice solution, thanks!

View Entire Topic
former_member184768
Active Contributor
0 Kudos

Couple of things, sequencing of the columns really do not matter as HANA is a columnar database and ordering of the columns can be arranged in the select statement or other artifacts.

Regarding the table data, how are you loading the data to the table. It is recommended to use .hdbtabledata file and associated file which actually contains data (for flat file data option). But if you are using any other means of loading the data (like flowgraph, then it is recommended to run the data load process again.

Changing the .hdbtable file will resulting in dropping the table and creating it again. It is not an ALTER TABLE option as of now.

alikhach
Explorer
0 Kudos

Thank you for your answer.

But could you please describe procedure for field name change on production system? Let's imagine we have a table MYTAB with fields ("ID", "Description", "Value"). In this table after half a year i have already 10000 entries. Then i decided to change my table and change the name "Description" to "Value_Description". What should i do in this case?

1. Change field description.

2. Build my project.

What next? Deploy (i'm not sure that it will be deployed. We have errors when tables have data, but this is another story)