Skip to content

Instantly share code, notes, and snippets.

@harshavardhana
Last active October 21, 2020 08:14
Show Gist options
  • Save harshavardhana/a8424dcf247fb68ad72b803cefb1b561 to your computer and use it in GitHub Desktop.
Save harshavardhana/a8424dcf247fb68ad72b803cefb1b561 to your computer and use it in GitHub Desktop.
./bin/drill-embedded                                                                                           
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Apr 19, 2017 4:53:50 PM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
apache drill 1.10.0 
"drill baby drill"

Now visit link http://localhost:8047 to open up Apache Drill explorer and configure S3 storage plugin refer

0: jdbc:drill:zk=local> USE `s3-lake`.`root`;
+-------+--------------------------------------------+
|  ok   |                  summary                   |
+-------+--------------------------------------------+
| true  | Default schema changed to [s3-lake.root]  |
+-------+--------------------------------------------+
1 row selected (19.958 seconds)
0: jdbc:drill:zk=local>

Download Lake Erie Fishing DataSet and upload to lake bucket using mc.

mc cp *.csv myminio/lake

Fetch and query the csv file from Minio server.

0: jdbc:drill:zk=local> SELECT * FROM `WB_Catch.csv`;

+---------+
| columns |
+---------+
| ["541","1312","17","9","2015","Autumn","10.9728","7.8","923.0932326","7200.127214","0.720012721","Yellow Perch","YAO","0","0","0","0","41.46292","-82.24912\r"] |
| ["541","1312","17","9","2015","Autumn","10.9728","7.8","923.0932326","7200.127214","0.720012721","Yellow Perch","YOY","5.136012696","0.020919384","7.133224933","0.029054186","41.46292","-82.24912\r"] |
+---------+
36,901 rows selected (14.931 seconds)
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configuration>
<property>
<name>fs.s3a.access.key</name>
<value>minio</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<value>minio123</value>
</property>
<property>
<name>fs.s3a.endpoint</name>
<value>http://147.75.193.27</value>
</property>
<property>
<name>fs.s3a.connection.ssl.enabled</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.path.style.access</name>
<value>true</value>
</property>
</configuration>
{
"type": "file",
"enabled": true,
"connection": "s3a://dicom",
"config": null,
"workspaces": {
"root": {
"location": "/",
"writable": false,
"defaultInputFormat": null
},
"tmp": {
"location": "/tmp",
"writable": true,
"defaultInputFormat": null
}
},
"formats": {
"psv": {
"type": "text",
"extensions": [
"tbl"
],
"delimiter": "|"
},
"csv": {
"type": "text",
"extensions": [
"csv"
],
"delimiter": ","
},
"tsv": {
"type": "text",
"extensions": [
"tsv"
],
"delimiter": "\t"
},
"httpd": {
"type": "httpd",
"logFormat": "%h %t \"%r\" %>s %b \"%{Referer}i\"",
"timestampFormat": null
},
"parquet": {
"type": "parquet"
},
"json": {
"type": "json",
"extensions": [
"json"
]
},
"avro": {
"type": "avro"
},
"sequencefile": {
"type": "sequencefile",
"extensions": [
"seq"
]
},
"csvh": {
"type": "text",
"extensions": [
"csvh"
],
"extractHeader": true,
"delimiter": ","
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment