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
Extension Settings & Customization
This extension has two custom setting which are accessible from
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
2️⃣ Number of Rows -> Used to customize the number of rows to be created, default value is 10.
How It Works
Reads the Schema Notation (CSN) file and parses the
types that decleared inside the
Afterwards, generates csv files filled with
random data for each entity.
Random strings come from
ATTENTION: This early preview version does not support all data types and features of Definition Language (CDL) yet.
SWAPI App Demo
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.
How to Use
Bring up Command Palette(
Ctrl+Shift+P) and type
Generate CSV Files ⌨️
Type the namespace of
schema.cds file ✍️
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)
Supported Features & Types 🎉
✔️ 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.
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.
❎ sap.common.CodeList entities (Countries, Currencies, Languages) are excluded by default with option to include from
❎ Entities annotated with
@cds.persistence.skip are excluded.
Unsupported Features & Limitations
❌ Many-to-many Relationships are not supported yet.
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.