An Embulk filter plugin to add a column to another JSON column as a new key.
- Plugin type: filter
- column: column name of JSON (string, required)
- column_to_be_added: column name to be added to JSON (required)
- path: key path to add column (string, optional, default is
$
)
input:
json_payload age
{"name": "John"} 23
{"name": "David"} 34
yaml:
filters:
- type: column_as_json_key
column: json_payload
column_to_be_added: age
output:
{"name":"John","age":23},23
{"name":"David","age":34},34
See also example.tsv and example.yml.
$ ./gradlew gem # -t to watch change of files and rebuild continuously