%% Read Parquet File into Table
% Get information about a Parquet file, read the data from the file into a table, and then read a subset of the variables into a table.
% Create a ParquetInfo object for the file outages.parquet.

info = parquetinfo('outages.parquet')

% Read data from the file into a table and display the first 10 rows.

T = parquetread('outages.parquet');
T(1:10,:) 

% Select and import the variables Region, OutageTime, and Cause into a table and display the first 10 rows.

SelVarNames = {'Region','OutageTime','Cause'};
T_subset = parquetread('outages.parquet','SelectedVariableNames',SelVarNames);
T_subset(1:10,:) 

% Copyright 2018 The MathWorks, Inc.