I was using a macbook with an iPython notebook. Below is the info I used on
mac to set up the DSN

Here is an example config for a zookeeper connection:

[ODBC Data Sources]
Drill 0.8 sandbox = MapR Drill ODBC Driver

[Drill 0.8 sandbox]
Driver = /opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib
ConnectionType = Zookeeper
HOST = [HOST]
PORT = [PORT]
ZKQuorum = maprdemo:5181
ZKClusterID = demo_mapr_com-drillbits
Catalog = DRILL
AdvanacedProperties =
CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;

Here is an example config for a direct connection:

[ODBC Data Sources]
Drill 0.8 sandbox = MapR Drill ODBC Driver

[Drill 0.8 sandbox]
Driver = /opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib
ConnectionType = Direct
HOST = maprdemo
PORT = 31010
ZKQuorum =
ZKClusterID =
Catalog = DRILL
AdvanacedProperties =
CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;


On Tue, Apr 21, 2015 at 11:50 AM, Charles Givre <[email protected]> wrote:

> Thanks Chris.  That's exactly what I was looking for.
>
>
> On Tue, Apr 21, 2015 at 12:45 PM, Christopher Matta <[email protected]>
> wrote:
> > Charles, I have an iPyghon notebook using PyODBC:
> > https://github.com/cjmatta/drill_ipython_notebook
> >
> > On Tuesday, April 21, 2015, Charles Givre <[email protected]> wrote:
> >
> >> All,
> >> Forgive the n00b question, but I've been trying to write a Python
> >> script to interact with Apache Drill.  I've installed the JayDeBeAPI,
> >> and PyODBC modules, but I've not been able to successfully connect.
> >> (I also installed the ODBC driver).  Does anyone have working code
> >> that establishes the connection and executes a query that you'd be
> >> willing to share?
> >> Thank you,
> >> - Charles
> >>
> >
> >
> > --
> > Chris Matta
> > [email protected]
> > 215-701-3146
>

Reply via email to