on 2022 Oct 18 11:32 AM
I am referring to URL:
https://cap.cloud.sap/docs/guides/databases?q=data+csv#providing-initial-data
Please get back to me on the following feedback:
For performance reasons, I am trying to import formerly exported/converted sqlite3 mock data
(generated from xml inside init.js)
to `data/TABLE.csv`. using plain tools
cds deploy srv --to sqlite:bme.db --no-savesqlite3 -header -csv bme.db \"select * from ns_Product;\" > ns-Product.csv
The current showstopper is the missing support for text properties containing newlines, because the `cds-deploy.js` can not handle it and throws an error.
But the official text/csv spec seems to support it
https://www.rfc-editor.org/rfc/rfc4180
escaped = DQUOTE *(TEXTDATA / COMMA / CR / LF / 2DQUOTE) DQUOTE
And this is also the way, sqlite3 exports the CSV from an existing table.
Is there maybe another way off adding text with newlines to initial mock data using CSV files (special escape sequence, etc)?
If there is no other way to handle it, any change to get support for this feature request?
I think, it would be a benefit, if CAP would could support this for initial data out-of-the-box.
Right know, i played some hours with workarounds, but none really fits my needs ;-(
Best Regards
Holger
Request clarification before answering.
User | Count |
---|---|
33 | |
21 | |
16 | |
8 | |
8 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.