Datastore with custom file reader
Use aFileDatastore
object to manage large collections of custom format files where the collection does not necessarily fit in memory or when a large custom format file does not fit in memory. You can create aFileDatastore
object using thefileDatastore
function, specify its properties, and then import and process the data using object functions.
specifies additional parameters andpropertiesforfds
= fileDatastore(location
,"ReadFcn",@fcn
,Name,Value
)fds
using one or more name-value pair arguments. For example, you can specify which files to include in the datastore depending on their extensions withfileDatastore(location,"ReadFcn",@customreader,"FileExtensions",[".exts",".extx"])
.
hasdata |
Determine if data is available to read |
numpartitions |
Number of datastore partitions |
partition |
Partition a datastore |
preview |
Preview subset of data in datastore |
read |
Read data in datastore |
readall |
Read all data in datastore |
writeall |
Write datastore to files |
reset |
Reset datastore to initial state |
transform |
Transform datastore |
combine |
Combine data from multiple datastores |
isPartitionable |
Determine whether datastore is partitionable |
isShuffleable |
Determine whether datastore is shuffleable |
shuffle |
Shuffle all data in datastore |
subset |
Create subset of datastore or file-set |
To use thesubset
andshuffle
functions on aFileDatastore
object, you must set"ReadMode"
to"file"
.