%% Read Parquet File into Timetable
% Read the data from the file into a timetable, and then use timetable functions to determine if the timetable is regular and sorted.
% Read data from outages.parquet into a timetable and display the first 10 rows. Use the second variable OutageTime in the data as the time vector for the timetable.

TT = parquetread('outages.parquet','RowTimes','OutageTime');
TT(1:10,:)

% Determine if the timetable is regular and sorted. A regular timetable has the same time interval between consecutive row times and a sorted timetable has a row time vector is in ascending order.

isregular(TT)
issorted(TT)

% Sort the timetable on its row times using the sortrows function and display the first 10 rows of the sorted data.

TT = sortrows(TT);
TT(1:10,:)

% Copyright 2018 The MathWorks, Inc.