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.
Be careful when using static data in tables. Entity Services (generated by the templates) use sequence algorithm to identity columns starting from
The automatic re-initialization of static content from the data file can be achieved when you create a
*.dsv file in your 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.
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 keyused as selection parameter for the update clause. The existing records in the table are not deleted in advance as at the
REPLACEcase. If no record exist by the given
ID, it got inserted.