-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Support Impala as DataSource #499
Conversation
|
||
try: | ||
from impala.dbapi import connect | ||
from dateutil import parser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to have dateutil in a try/except block.
|
||
if error is not None: | ||
raise Exception("Failed getting schema.") | ||
return json.loads(results)['rows'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add to run_query another parameter (json_result) with default of True, and when it's False don't do json.dumps and return data as is. I wanted to implement something like this for all connectors. Maybe even do the json.dumps in a layer above.
If you still prefer to keep this method, give it a more describing name and make it "protected".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now I'll keep it the same (protecting + different name)
will implement your suggestion in next pull req :-)
Feature: Support Impala as DataSource
Feature: Support Impala as DataSource
initial support for Cloudera Impala.
http://www.cloudera.com/content/cloudera/en/products-and-services/cdh/impala.html
CDH version 5.2 and above.
python connector via https://github.com/cloudera/impyla