How to read a big ndjson (20GB) file by chunk into R?
I have a big data file that I want to read 1M rows at a time.
currently, I'm using below code to load data into R.
jsonlite::stream_in(
file(fileName)
)
But I don't need to load all data together. how can I split this file to chunk to load faster?
If you don't want to level-up and use Drill, this will work on any system
zcat
(orgzcat
) andsed
live:Choose and/or add a different
cat_kind
for whatever works for you.