Versions Compared
Version | Old Version 3 | New Version 4 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Description
Whereas standard CSV processing in Helium processes an entire blob, representing a CSV file, at once to produce a collection of object instances, the batch CSV processing features takes a multi-step approach:
- First the
Mez:createBatch
built-in function is used to create a batch from a blob representing a valid CSV file. - The built-in
MezBatch
andMezBatchItem
objects are used to store the created batch. - The created batch can then be processed item by item using the
fromCsvLine
built-in function.
MezBatch and MezBatchItem Built-in Objects
The following two objects are used to store batches that are created by the use of the Mez:createBatch
built-in function. These objects are built-in objects meaning they are included, by Helium, as part of every Helium app:
Code Block | ||
---|---|---|
| ||
@NotTracked
persistent object MezBatch {
string name;
string header;
} |
Code Block |
---|
@NotTracked
persistent object MezBatchItem {
bool processed;
string value;
@ManyToOne
MezBatch batch via batchItems;
} |
Creating a Batch for Processing
Processing an Existing Batch
Exception Handling and Debugging
Additional Example
Additional Mentions and References