Filter löschen
Filter löschen

Read a datastore by logical groups

1 Ansicht (letzte 30 Tage)
Stepp Gyogi
Stepp Gyogi am 19 Aug. 2020
Kommentiert: Mohammad Sami am 3 Sep. 2020
Currently, I have been able to load a tabularTextDatastore which contains about 4 year's worth of daily data for a bunch of uniquely identified products. These products have unique keys, and the export I did from the database sorts the data by key, date. Therefore, the first (say) 1000 lines will be for product 1, the next (say) 800 for product 2, etc. As you notice in my example, products don't necessarily all have data for all days, therefore I cannot read this datastore by constant chunks of N rows (which I have found in the documentation is possible).
Question: is there an easy or better way to read the data by chunks which correspond to the key which is one of the variables in the datastore?
PS: my DIY way around this would be to read by N rows, such that N is greater than the number of days for any product, and then only select the lines corresponding to a given product. This is awkward at best as it requires bookkeeping where your pointer to the last relevant row is, so I'm hoping this is not the answer.

Antworten (0)

Kategorien

Mehr zu Big Data Processing finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by