%% Return Timetable from Parquet Datastore
% Use the OutputType and RowTimes name-value pairs to make ParquetDatastore return timetables instead of tables.
%
% Create a datastore for airlinesmall.parquet. Specify the 'OutputType' name-value pair as 'timetable'.

pds = parquetDatastore('airlinesmall.parquet','OutputType','timetable');
preview(pds)

% When you do not also specify 'RowTimes', parquetDatastore uses the first datetime or duration variable as the row times. In this case, the Date variable is used for the row times.
%
% Specify the 'RowTimes' option to use the arrival times (ArrTime) as the row times, instead of the flight dates.

pds = parquetDatastore('airlinesmall.parquet','OutputType','timetable','RowTimes','ArrTime');
preview(pds)

% Copyright 2019 The MathWorks, Inc.