With apache drill 1.2, we can query over RDBMS data. Check more here: https://drill.apache.org/blog/2015/10/16/drill-1.2-released/
so, I tried to add a plugin for MySQL. I am doing it using the web client. I created a plugin with name mysql
and added following configurations:
{
"type": "jdbc",
"driver": "com.mysql.jdbc.Driver",
"uri": "jdbc:mysql://<IP>:3306/classicmodels",
"username": "root",
"password": "root",
"enabled": true
}
Also, I added mysql.jar
in /apache-drill-1.2.0/jars/3rdparty
It is showing error:
(Invalid JSON mapping)
Any pointer on this. Is there any documentation for that?
The correct way to add storage plugin for MySQL:
{
"type": "jdbc",
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://<IP>",
"username": "root",
"password": "root",
"enabled": true
}
noticed url instead of uri.
After adding plugin, query can be done using:
select * from mysql.classicmodels.`customers`;
where classicmodels
is Database name & customers
table name.
Apologies for bumping out. I've got a similar issue while creating Storage/Configurations. When including the configurations under plugin creation, it says a Unable to create/update storage
. Did you encounter this issue while creating a storage plugin? I followed the docs from drill
EDIT:
Drill does test connection on the fly when creating the plugin. The machine wasn't up at the time of creating the plugin. When the machine was back, it worked.
来源:https://stackoverflow.com/questions/33232644/unable-to-query-on-rdbms-using-apache-drill