Delimiter Separated Values (*.dsv) data files are used for importing test data during development or for defining static content for e.g. nomenclatures. The data file name has to be the same as the target table name. The delimiter uses the `|` char, and the order of the data fields should be the same as the natural order in the target table. If you want to import particular data only once, this can be done via the Import Data wizard.
Be careful when using static data in tables. Entity Services (generated by the templates) use sequence algorithm to identity columns starting from 1.
The automatic re-initialization of static content from the data file can be achieved when you create a *.dsv file under the DataStructures folder of the given project.
To make it more flexible it is introduced semantic files as follows:
REPLACE (.replace) - the rows in the database table always correspond to the lines in the data file. Processing of this type of files means - first delete all the records in the database table and insert the rows from the file. This is the behavior of the initial format - DSV (.dsv). The processing is triggered on restart of the App/Web Server or on publishing of the project containing these files.
APPEND (*.append) - the rows from these files are imported only once into the corresponding database tables. If the tables already contain some records the inserting is skipped. After the initial import the corresponding sequence is set to the max ID of the table, so that this table can be used afterwards as persistence storage for the e.g. standard CRUD Scripting Services.
DELETE (.delete) - if the file contains ‘’ as the only line, the whole table is cleaned up. Otherwise only the listed records got deleted by the ID (first column = ID = primary key).
UPDATE (*.update) - the records in the database table got updated with the corresponding lines in the data files. The first column is the ID = primary key used as selection parameter for the update clause. The existing records in the table are not deleted in advance as at the REPLACE case. If no record exist by the given ID, it got inserted.