Apace Drill provides support to the Parquet columnar storage format. In this section, we will create a table in a columnar storage format and run the select query on it.
Create a Table in Parquet Columnar Storage Format
Now we will create the table in the Parquet File format using the below command. We will use the existing "emp_detail.json" file to create the table.
For Parquet columnar storage format, we need to change the storage format of Apache Drill using the below command.
Command:
apache drill> alter sessionset `store.format`= 'parquet';
Output:
Now let's create the table using the below command.
Command:
apache drill> CREATE TABLE dfs.tmp.`/home/cloudduggu/drill/sample-data/` as SELECT * FROM dfs.`/home/cloudduggu/drill/sample-data/emp_detail.json`;
Output:
The table has been created, lets run the below command to see the content of the table.
Command:
apache drill> SELECT * FROM dfs.tmp.`/home/cloudduggu/drill/sample-data/`;