Split dataFrame into 1MB chunks and create a single json array with each row in chunk being an array element

rusty9876543
New Contributor II

Hi, I have a dataFrame that I've been able to convert into a struct with each row being a JSON object.

I want the ability to split the data frame into 1MB chunks. Once I have the chunks, I would like to add all rows in each respective chunk into a single JSON array.