JsonToIon​Json​To​Ion

Convert a JSON file into ION.

We support one JSON dictionary/map per line as well as a JSON file in array format.

Here is how a sample JSON file content might look like:

text
{"product_id": "1","product_name": "streamline turn-key systems","product_category": "Electronics","brand": "gomez"},
{"product_id": "2","product_name": "morph viral applications","product_category": "Household","brand": "wolfe"},
{"product_id": "3","product_name": "expedite front-end schemas","product_category": "Household","brand": "davis-martinez"}

Here is how a sample JSON file in array format might look:

text
[
    {"product_id": "1","product_name": "streamline turn-key systems","product_category": "Electronics","brand": "gomez"},
    {"product_id": "2","product_name": "morph viral applications","product_category": "Household","brand": "wolfe"},
    {"product_id": "3","product_name": "expedite front-end schemas","product_category": "Household","brand": "davis-martinez"}
]
yaml
type: "io.kestra.plugin.serdes.json.JsonToIon"

Convert a JSON file to the Amazon Ion format.

yaml
id: json_to_ion
namespace: company.team

tasks:
  - id: http_download
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/json/products.json

  - id: to_ion
    type: io.kestra.plugin.serdes.json.JsonToIon
    from: "{{ outputs.http_download.uri }}"
Properties

Source file URI

Default UTF-8

The name of a supported charset

Default value is UTF-8.

Default true

Is the file is a json new line (JSON-NL)

Is the file is a json with new line separator Warning, if not, the whole file will loaded in memory and can lead to out of memory!

Format uri

URI of a temporary result file