JsonToIon
Read a JSON file and write it to an ION serialized data file.
Please note that we support JSONL format only, i.e. one JSON dictionary/map per line.
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"}
We do NOT support an array of JSON objects. A JSON file in the following array format is not supported:
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 }}"
Dynamic YES
Source file URI
Dynamic YES
Default UTF-8
The name of a supported charset
Default value is UTF-8.
Dynamic YES
Default true
Format uri
URI of a temporary result file