Is there any limit to the number of rows that can be read by datastore function?

15 views (last 30 days)
Hi I'm trying to parse a very large *.csv file into multiple *.csv file by MATLAB.
The size of *.csv file is about 47GB and has about 2Million rows.
The picture below is my workspace in Matlab and you can see the target csv file of 47GB in red rectangle
I set the read size of datastore as 10^5 by ReadSize,
you can see rows of data loaded to table 'T'.
I thought, by repetitively executing 'read' command, I can load all the data in 'FAT_ANALYSIS_REAL_ALL1.csv'.
Here's the 1st recommanding result, yo can check 'clear' ,'clc', datastore and readsize command deactivated,
and from red rectangle above, we can check that the read range of 'ttds' has move about 10^5 row by the increase of row index from '82630' to '171914'.
I reactivate the same code, and expected another 10^5 rows of data loaded form target file.
but you can see from the figure below that only 96438 row loaded to 'T' array
and I cannot load further data from 'read' function.
I hope to know why this happened.
It's not definitely cause by the shortage of the database, if i open up the file 's.csv' in high-end text editor,
you can check the scroll bar is only 1/5 to the totall but the row number is already around 2*10^5 in the lefthandside.
Here's the info of my computer, I hope this info help you guys figure out why this happened.
And the figure below is the info of target file 'FAT_ANALYSIS_REAL_ALL1.csv'
  6 Comments
Mohammad Sami
Mohammad Sami on 27 Aug 2020
After the third read if you run the hasdata function on datastore, what does it return.
tf = hasdata(ttds);
Mohammad Sami
Mohammad Sami on 27 Aug 2020
The internal matlab file readdata.m is located in the following folder in C:\Program Files\MATLAB\RXXXX
toolbox\matlab\datastoreio\+matlab\+io\+datastore\@TabularTextDatastore.
you can try adding a debug in the readdata.m and see what may be happening.

Sign in to comment.

Answers (0)

Categories

Find more on Large Files and Big Data in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!