JSON Load

This load type allows writing tabular data in a JSON file. In the simple standard case, the target data format is fixed and predefined by the name of the source columns. Only the named root element can be configured. A more flexible JSON output structure can be achieved by defining a JSON template.

Settings

Data source The component that provides the data to the load, e.g. extract or transform
Target connection A connection of type JsonFile.
Mode
create Create a new file, delete an existing file if existing.
add Create a new file if not existing, add data to an existing file.
Root element The name of the JSON root element.
If not indicated default name is "data".
Json template A Json expression describing the output structure for one source row. It contains placeholders for the source columns in the form #{<ColumnName>}
Example:
{"bookstore":{
"books":{ "#{Category}":[{"name": "#{Title}", "Author": "#{Author}","Price": #{Price}}
]}}}

Input columns:
"Category";"Author";"Title";"Price"
"fiction";"Evelyn Waugh";"Sword of Honour";"12.99"

Result:
{"bookstore": {"books": {"fiction": [{
"Price": 12.99,
"name": "Sword of Honour",
"Author": "Evelyn Waugh"
}]}}}
Do not generate empty file Default: false

JSON load with REST connection

If you use a connection type REST to send a RESTful request to an external API endpoint within an Integrator execution, the REST connection must use HTTP method POST, PUT, or DELETE. The data may be static or filled dynamically during the load.

Dynamic data: in this case, the request body of the REST connection is filled dynamically during the load with the JSON data generated by the JSON load. Therefore, the REST connection must have an empty request body in its definition.

Static data: in this case, the JSON load must not have a data source assigned. The JSON load simply executes the HTTP call as defined in the REST connection.

Updated January 29, 2024