Apache Drill integration with Jupyter - "Exception: Status Code: 500 - Error"

Hi All,

We are trying to integrate Apache Jupyter Notebook with Apache Drill. When we select python3 shell and execute “%drill connect” we will see the following exception “exception with status code:500” Can some body please hint me what could be the issue ?

I will appreciate your help.

Logs:

%drill connect


Connecting to Drill URL: http://:8047

Please enter the password you wish to connect with:
Drill Connect Password: ········


Exception Traceback (most recent call last)
in
----> 1 get_ipython().run_line_magic(‘drill’, ‘connect’)

~/jupyter/jupyter-env/lib/python3.5/site-packages/drill_core/drill_base.py in authDrill(self)
310 result = 0
311 else:
–> 312 raise Exception(“Status Code: %s - Error” % r.status_code)
313 return result
314

Exception: Status Code: 500 - Error

1 Like

I’m guessing you’re trying to use the jupyter_drill magic?

I made a start on building a test Binder some time ago at https://github.com/ouseful-PR/jupyter_drill/tree/binderise but never really got very far in trying to actually get it working / doing a demo notebook.

From a quick test just now (added to the README), I seem to be able to connect with pyDrill and run a query on a local file, but trying to use the magic throws a similar error to the one you saw.

1 Like

Did you perform the initialization described in the jupyter_drill README?

1 Like

I did not followed the README.md, But I have followed the blog post link https://mapr.com/blog/drilling-jupyter/

1 Like

Followed the README, used register_magics and still get the same status code 500 error at ‘%drill connect’ command.

1 Like

We are at Vegas Apache Conf 2019, If anybody attending the conference. Can we sync up ?
We are facing the same issue, I will appreciate your help.

Logs:

%drill connect
Connecting as user linaro

Connecting to Drill URL: http://:8047

Please enter the password you wish to connect with:
Drill Connect Password: ········

Exception Traceback (most recent call last)
in
----> 1 get_ipython().run_line_magic(‘drill’, ‘connect’)

~/jupyterprojectdir/jupyterprojectdir/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2312 kwargs[‘local_ns’] = sys._getframe(stack_depth).f_locals
2313 with self.builtin_trap:
-> 2314 result = fn(*args, **kwargs)
2315 return result
2316

</home/linaro/jupyterprojectdir/jupyterprojectdir/lib/python3.7/site-packages/decorator.py:decorator-gen-126> in drill(self, line, cell)

~/jupyterprojectdir/jupyterprojectdir/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it’s overkill for just that one bit of state.
186 def magic_deco(arg):
–> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):

~/jupyter_drill/drill_core/drill_base.py in drill(self, line, cell)
346 self.connectDrill(True)
347 elif line.lower() == “connect”:
–> 348 self.connectDrill(False)
349 elif line.lower() .find('set ') == 0:
350 self.setvar(line)

~/jupyter_drill/drill_core/drill_base.py in connectDrill(self, prompt)
210 requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
211 result = -1
–> 212 result = self.authDrill()
213 if result == 0:
214 self.drill_connected = True

~/jupyter_drill/drill_core/drill_base.py in authDrill(self)
293 result = 0
294 else:
–> 295 raise Exception(“Status Code: %s - Error” % r.status_code)
296 return result
297

Exception: Status Code: 500 - Error