blob: 775aee8c44dace36b9b3add1a4a8859ce9828e90 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{ncMP:function(e,t,n){"use strict";n.r(t),n.d(t,"_frontmatter",(function(){return r})),n.d(t,"default",(function(){return s}));var l=n("k1TG"),o=n("8o2o"),c=(n("q1tI"),n("7ljp")),a=n("hhGP"),r=(n("qKvR"),{});void 0!==r&&r&&r===Object(r)&&Object.isExtensible(r)&&!r.hasOwnProperty("__filemeta")&&Object.defineProperty(r,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/pages/docs/Connecting to Databases/drill.mdx"}});var i={_frontmatter:r},b=a.a;function s(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(c.b)(b,Object(l.a)({},i,n,{components:t,mdxType:"MDXLayout"}),Object(c.b)("h2",{id:"apache-drill"},"Apache Drill"),Object(c.b)("h3",{id:"sqlalchemy"},"SQLAlchemy"),Object(c.b)("p",null,"The recommended way to connect to Apache Drill is through SQLAlchemy. You can use the\n",Object(c.b)("a",Object(l.a)({parentName:"p"},{href:"https://github.com/JohnOmernik/sqlalchemy-drill"}),"sqlalchemy-drill")," package."),Object(c.b)("p",null,"Once that is done, you can connect to Drill in two ways, either via the REST interface or by JDBC.\nIf you are connecting via JDBC, you must have the Drill JDBC Driver installed."),Object(c.b)("p",null,"The basic connection string for Drill looks like this:"),Object(c.b)("pre",null,Object(c.b)("code",Object(l.a)({parentName:"pre"},{}),"drill+sadrill://<username>:<password>@<host>:<port>/<storage_plugin>?use_ssl=True\n")),Object(c.b)("p",null,"To connect to Drill running on a local machine running in embedded mode you can use the following\nconnection string:"),Object(c.b)("pre",null,Object(c.b)("code",Object(l.a)({parentName:"pre"},{}),"drill+sadrill://localhost:8047/dfs?use_ssl=False\n")),Object(c.b)("h3",{id:"jdbc"},"JDBC"),Object(c.b)("p",null,"Connecting to Drill through JDBC is more complicated and we recommend following\n",Object(c.b)("a",Object(l.a)({parentName:"p"},{href:"https://drill.apache.org/docs/using-the-jdbc-driver/"}),"this tutorial"),"."),Object(c.b)("p",null,"The connection string looks like:"),Object(c.b)("pre",null,Object(c.b)("code",Object(l.a)({parentName:"pre"},{}),"drill+jdbc://<username>:<passsword>@<host>:<port>\n")),Object(c.b)("h3",{id:"odbc"},"ODBC"),Object(c.b)("p",null,"We recommend reading the\n",Object(c.b)("a",Object(l.a)({parentName:"p"},{href:"https://drill.apache.org/docs/installing-the-driver-on-linux/"}),"Apache Drill documentation")," and read\nthe ",Object(c.b)("a",Object(l.a)({parentName:"p"},{href:"https://github.com/JohnOmernik/sqlalchemy-drill#usage-with-odbc"}),"Github README")," to learn how to\nwork with Drill through ODBC."))}void 0!==s&&s&&s===Object(s)&&Object.isExtensible(s)&&!s.hasOwnProperty("__filemeta")&&Object.defineProperty(s,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/pages/docs/Connecting to Databases/drill.mdx"}}),s.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-docs-connecting-to-databases-drill-mdx-5b8b8ef7a3c8b2de58ec.js.map