split-json.js requires 2 arguments.
- Name of the file to be splited
- Numbers of objects per file
eg. node split-json.js ./PAPM_cfp_CARRIER_FOOT_PRINT.json 10000
To migrate, use the index.js file index.js requires 4 arguments
- Filepath of the json to migrate
- method: "add" or "batch"
- Name of the collections
- The id key of the object
eg node index.js ./splited/example.json2.json batch tmf-630_carrier_footprint ID
ALMOST ALWAYS BATCH SHOULD BE USED INSTEAD OF set
const populateAll = async() => { for(let i=6; i<=29; i++){ ... } }
Change i to be the range of the files