cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP: SQLite deploy error about csv location

alicegavanelli
Participant
1,816

Dear Experts,

reading CAP documentation about deploy providing-initial-data I noticed that csv files, could be located in three different folders: db/csv, db/data/, or db/src/csv

I have tryed with all of these, under the results:

db/csv -> OK

db/data -> OK

db/data/other_folder -> KO

db/src/csv -> KO

In documentation if I read db/data/ with symbol "/" I understand that I could add other underfolder. But it is not true. Is it an error?

Folder db/src/csv doesn't work despite documenation.

Below my release:

@sap/cds: 5.0.6
@sap/cds-compiler: 2.4.4
@sap/cds-dk: 4.0.7
@sap/cds-foss: 2.3.1
@sap/cds-runtime: 3.0.9
Node.js: v14.16.0<br>

Thank you in advance.

Best

Alice

View Entire Topic
chgeo
Product and Topic Expert
Product and Topic Expert

CSV files from subfolders of `db/data` or `db/csv` are not deployed by intention.

Please provide the link to the documentation where you think this would be stated differently.

alicegavanelli
Participant
0 Likes

Dear Christian,

as you can read in my post, link is already provided.

However I put it again Link to CAP documentation

CSV files from subfolders of `db/data` are documented in the link above; the '/' could be a documenation misunderstanding.

CSV files from subfolders of `db/csv` are not documented and It is not my request.

I ask about 'db/src/csv' that actually in documentation as you can see below.

Thank

Alice

alicegavanelli
Participant
0 Likes

Dear Christian,

What about 'db/src/csv'?

Thank

Alice

Ren
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Alice,

valid question. I think our documentation is not clear enough at that end. The csv files are only picked up for models located in the parent folder. And in the db/src/csv case it's a little bit special, because usually only native database artifacts are located there. Most probably SAP HANA artifacts. So from the db/src/csv folder, no initial data is fetched for .cds files located in the db folder.

Hope that helps. And I'll trigger an update to our documentation.

All the best,

René