CDS CSV Generator is a tool to create initial CSV data files for SAP Cloud Application Programming Model applications.
The purpose is just to speed up the development 🚀
Available on Visual Studio Marketplace and Open VSX
This extension has two custom setting which are accessible from Settings editor
.
1️⃣ Common Entities -> If checked, CSV files for aspect sap.common.CodeList
will be produced.
Values for entities Countries, Currencies and Languages are retrieved from SAP-samples/cloud-cap-samples
.
2️⃣ Number of Rows -> Used to customize the number of rows to be created, default value is 10.
Reads the Schema Notation (CSN) file and parses the entities
, fields
and types
that decleared inside the schema.cds
file.
Afterwards, generates csv files filled with mock
or random
data for each entity.
Random strings come from mock-data/mockStrings.json
file.
ATTENTION: This early preview version does not support all data types and features of Definition Language (CDL) yet.
INFO: The sample app that used in this demo is : https://github.com/SAP-samples/cloud-cap-hana-swapi. This awesome and quite complex application is really good choice to try this extension.
-
Bring up Command Palette(
Ctrl+Shift+P
) and typeGenerate CSV Files
⌨️ -
Type the namespace of
schema.cds
file ✍️ -
Choose
csn
file from file dialog 📋 -
Choose a folder to save csv files(db/csv, db/data/ or db/src/csv) 📁
To use CAP CSV Generator, csn file should be created by building the app(mbt build or cds build)
✔️ Compositions and Associations are supported as one-to-one.
✔️ Enums supported with release v0.0.5. The values will be selected from the list of enumeration values.
✔️ cds.UUID
✔️ cds.Timestamp
✔️ cds.DateTime
✔️ cds.Integer
✔️ cds.String
✔️ cds.LargeString
✔️ cds.Boolean
ATTENTION: Below features are excluded to avoid creating a large number of potentially unnecessary files, entites and elements.
❎ Virtual Elements are excluded.
❎ Abstract Entites are excluded.
❎ Views and Projections are excluded.
❎ Entities annotated with @cds.persistence.skip
are excluded.
❌ Many-to-many Relationships are not supported yet.
❌ Mock string
values are selected from a list of one to three
words. In case of exactly one word required(e.g. for a key element), two or three words may appear.
🎉 Enjoy!