Skip to Content
Jan 19, 2021 at 09:09 AM

How to force undeploy on specific file ?



I have an issue with an .hdbrole artifact that would be solved by changing the deployment parameter force_undeploy to true.
When doing a build of this specific artifact or of the full db module, I would like this parameter to always being set to true but only for this artifact and not the others. Indeed, if I would apply this parameter to an .hdbtable artifact, it would drop/create the table instead of doing an alter and the data would be lost.
I have tried to configure the package.json of my db module in the following way but it is not working. My idea was to perform 2 deploy instead of one. The first one would ignore my hdbrole and the second one would deploy my hdbrole only with the parameter force_undeploy=true.

    "name": "deploy",
    "dependencies": {
        "@sap/hdi-deploy": "3.10.0"
    "scripts": {
        "start": "node node_modules/@sap/hdi-deploy/deploy.js --exclude-filter src/RO_DataPreviewOnNodes.hdbrole ; 
                  node node_modules/@sap/hdi-deploy/deploy.js --include-filter src/RO_DataPreviewOnNodes.hdbrole --parameter force_undeploy=true;"

Unfortunately, that's not working. I'm getting the following error:

npm ERR! Failed at the deploy@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.