Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

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 and MezBatchItem 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:

@NotTracked
persistent object MezBatch {
    string name;
    string header;
}
@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

 

  • No labels