A connector will be used to manage CSV files
A CVS is an ASCII file. The file contains multiple line. The first line is the definition, and each other line are records, one record per line. The definition line contains a serie of fields separate by a separator. By default, the separator is a ";".
Example:
FirstName;LastName;Email;Address;City:Country
Pierre-Yves;Monnet;[email protected];833 Washington av;San Francisco;USA
Francis;Hulster;[email protected];65 champs Elysée;Paris;France
The FileStorage library is used.
- get-properties
Return information on the CSV: number of items, headers, multi format CSV or unique
- read
Read a CSV, and produce a list of Map. A converter can be associate (to transform a String in Integer, or a String in a java.util.date) A page number, and number of records in the page is given to handle large CSV and protect the reader. A multi header CSV can be manage by the reader
A filter can be added during the read, via multiple key (read only data where amount > 1000)
- write - append
Write a List of Map in a CSV. A converter can be associated, to transform a java.util.Date to a special string format. The writer can append data in an existing CSV, and it will respect the format of the existing CSV then.
As option, it can update the CSV to add new columns
- update a CVS
Update an existing CVS with a List of Map. A converter is provided, and correlation keys (for example, the correlation key is 'firstName', 'lastname') to find the record in the existing CSV.
Flow functions
These functions do not provide any process variable with data, but process CSV file completely and produce a new CSV file.
- Merge
Merge two CSV files in one file. It can merge only data (assuming the first CSV is the reference) or data and header
- filter
Filter a complete CSV file to a new file.
Each function onboard selectors. Selectors filter the input to keep only some data records
Different transformer
csvFunction = create-user
Name | Description | Class | Default | Level |
---|---|---|---|---|
userRealm | The user is created in a realm | java.lang.String | camunda-platform |
REQUIRED |
(1) UserRole: give a string separate by n like "Operate,Tasklist" or "Optimize"
Name | Description | Class | Level |
---|---|---|---|
userId | Id of user created (or updated) | java.lang.String | REQUIRED |
Name | Explanation |
---|---|
KEYCLOAK_CONNECTION | Error arrived during the Keycloak connection |
mvn clean package
Two jars are produced. The jar with all dependencies can be uploaded in the Cherry Framework
The element template can be found in the element-templates directory.