cancel
Showing results for 
Search instead for 
Did you mean: 

CSV file, ignore while deploying to production

NitinMahajan
Product and Topic Expert
Product and Topic Expert

Hi ,

I am using CAP for build an application on HANA Cloud. I have used CSV file to do some testing. However, while deploying to production, i want to ignore those files?

Is it possible by some configuration (for example in Package.json)?

Regards,

nitin

View Entire Topic
lothar_bender
Advisor
Advisor

The better solution might be to move the CSV files containing test data to the folder test/data.
cds watch is loading CSV files contained in the test folder by default while cds watch --production does not. Same holds true for production build and deployments, e.g. cds build --production, cds deploy --to hana --production.

Make sure that CSV files intended for testing aren't deployed to production by mistake as this would impact subsequent HANA deployments.

See also [providing initial data](https://cap.cloud.sap/docs/guides/databases#providing-initial-data).

Anton_Mavrin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Sounds like a great solution 🙂

alespad
Contributor
0 Kudos

Hi Lothar,

in my opinion this is the best approach to have a local environment with data with no risk to deploying csv in production,

I didn't find anything in cap.cloud.sap , do you know how to find additional documentation about it? by the way I already tried and it works like a charm

Thanks

lothar_bender
Advisor
Advisor
0 Kudos
This approach isn't documented yet, but we will integrate it as part of some other changes related to the "handling initial test data topic"