I have to merge ~1000 large json files (1M .. 500M) into a single file (~80GB) on Ubuntu 18. According to this SO question, I use jq with
jq -s 'reduce .[] as $item ({}; . * $item)' ~/ml/train-*.json > train.json
which works quite nice for less smaller files.
The machine where merging happens is a 32 core server with 128 GB RAM. Alas, the task ends with a
Killed
statement, but in terms of memory, the resources should be sufficient. Can somebody please give me some advice how to manage this task? Thnx