Skip to content
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

Merged
merged 6 commits into from
Jul 22, 2015
Merged

Conversation

alexanderlz
Copy link
Member

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


try:
from impala.dbapi import connect
from dateutil import parser
Copy link
Member

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']
Copy link
Member

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".

Copy link
Member Author

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 :-)

arikfr added a commit that referenced this pull request Jul 22, 2015
Feature: Support Impala as DataSource
@arikfr arikfr merged commit 5d3caac into getredash:master Jul 22, 2015
dairyo pushed a commit to KiiCorp/redash that referenced this pull request Mar 1, 2019
Feature: Support Impala as DataSource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants