formatstring error when using tabularTextDatastore

5 views (last 30 days)

Hello all,
I am trying to read a large CSV file (~500GB) using tabularTextDatastore.
my command line is just one:
ds = tabularTextDatastore('filename.csv')
the error I'm getting is:
Error using tabularTextDatastore (line 147)
Output argument "formatString" (and maybe others) not assigned duting call to ">convertDatatypeToFormatString".

could't find any material on this error online, can someone please advise?



Sign in to comment.

Answers (1)

Jeremy Hughes
Jeremy Hughes on 8 Dec 2022
Edited: Jeremy Hughes on 8 Dec 2022
Turns out this was a bug in R2020a and is been fixed in R2020b. See:
You can work around this with:
ds = tabularTextDatastore('sample file.csv','Delimiter',';','TextscanFormats',"%f%f%f%f%f%q")
ds = tabularTextDatastore('sample file.csv','Delimiter',';','TextscanFormats',"%f%f%f%f%f%x")
Jeremy Hughes
Jeremy Hughes on 13 Dec 2022
The other alternative is to use all %q fields:
ds = tabularTextDatastore('sample file.csv','Delimiter',';','TextscanFormats',"%q%q%q%q%q%q")

Sign in to comment.


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

Community Treasure Hunt

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

Start Hunting!