on 06-08-2021 8:55 AM
Hello Experts,
I am working on a CAP based Programming model wherein I have defined few entities in data-model.cds in db folder as below
Now the problem is that whenever I make any changes in any of the fields for defined entities and deploy mta.yml file, it always defaults the data in those entities from those csv files, which was once added for testing purposes and deleted later on.
Although I have explored SAP note 2922271 and following steps have been mentioned:
"start": "node node_modules/@sap/hdi-deploy/deploy.js --undeploy src/<mytable>.hdbtabledata --path-parameter src/<mytable>.hdbtabledata:skip_data_deletion=true"
Now, my question is where to add undeploy.json file?
Shall I add it inside db folder? If yes, there is no package.json file in db folder to extend the command line for hdideploy.js.
And, I could only see package.json in gen folder. Do I need to perform all the steps here?
Please provide your inputs as this deployment has become a huge issue for us.
Thanks and Regards,
Navneet Kaur.
Hi Navneet,
I had the same issue at one point. All I needed was the undeploy.json file which I placed in the root of the db folder.
I included the path to both the csv files and the hdbtabledata files to clear them.
I typically upload my CSV files through the hana database explorer when setting up my seed data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gavin,
Thanks for your input. I tried putting undeploy.json in the root of db folder as below:
[
"my.xxxxxxx.tableName.hdbtabledata",
"my.xxxxxxx.tableName.csv"
]
Then tried to deploy, it is still erasing all the data and putting the previous data as it was there in tableName.csv. However, it is not existing anymore in data folder.
Is it really required to upload CSV files in HANA DB explorer? Is there not any way that I deploy DB and the already created data remains in the table?
User | Count |
---|---|
81 | |
11 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.