%% Specify Read Size for ParquetDatastore
% Create a datastore for a sample Parquet file, and then read data from the file with different ReadSize values.
% Create a datastore for airlinesmall.parquet, set ReadSize to 10 rows, and then read from the datastore. The value of ReadSize determines how many rows of data are read from the datastore with each call to the read function.

pds = parquetDatastore('outages.parquet','ReadSize',10);
read(pds)

% Set the ReadSize property value to 'file' and read from the datastore. Every call to the read function reads all the data from the datastore.

pds.ReadSize ='file'; 
data = read(pds)

% You also can set the value of ReadSize property to 'rowgroup'. For more information, see the ReadSize property of the ParquetDatastore object reference page.
% Copyright 2018 The MathWorks, Inc.