Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

examples package: Data transformation

The examples package contains services that demonstrate how you can transform data using Gloop. These services are under the dataTransformation package and are described in the following table:

Service Description
ArrayToSingleObject.gloop Maps an array to a single object.
SingleObjectToArray.gloop Maps a single object to an array.
FileToInputStream.gloop Converts a File to an InputStream.
StringToInputStream.gloop Converts a String to an InputStream.
StringToReader.gloop Converts a String to a Reader.
StringToBlob.gloop Converts a String to a BLOB.
StringToClob.gloop Converts a String to a CLOB.

Like their names imply, these services deal with the conversion of data from one type to another.

Related articles

Please see the following articles for more information:

Try it!

In the Navigator, expand the examples package and navigate to the code folder, then expand the dataTransformation package. This package contains the files and/or directories as shown below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
examples
├── ...
└── code
    └── ...
    └── dataTransformation
        ├── sql
           ├── InsertBlob.gloop
           ├── InsertClob.gloop
           ├── SelectAllBlob.gloop
           ├── SelectBlob.gloop
           └── SelectClob.gloop
        ├── ArrayToSingleObject.gloop
        ├── DatabaseRecordToCSV.gloop
        ├── FileToInputStream.gloop
        ├── SingleObjectToArray.gloop
        ├── StringToBlob.gloop
        ├── StringToClob.gloop
        ├── StringToInputStream.gloop
        └── StringToReader.gloop

The primary services are located directly under the dataTransformation package. These are the services that you should open and run to see data transformation examples. Each service has been documented to include instructions on how to invoke the service, the expected output, and comments on every step1.

Explanation

Simple transformations can be done simply by creating map lines between properties using the Mapper view. However, for more complex tasks, a custom strategy might be needed; typically through set expressions.


  1. Open the Gloop service file to see comments. Make sure comments are also not hidden.