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

Add phoenix query runner. #3153

Merged
merged 4 commits into from
Mar 27, 2019
Merged

Conversation

combineads
Copy link
Contributor

@combineads combineads commented Dec 1, 2018

This is an apache phoenix query runner. The query runner presently does not support Kerberos authentication. But I plan to implement it soon.
screenshot a query runner configuration

@request-info
Copy link

request-info bot commented Dec 1, 2018

We would appreciate it if you could provide us with more info about this issue/pr!

@request-info request-info bot added the Needs More Information Seen by a team member, not ready for a full review label Dec 1, 2018
@combineads
Copy link
Contributor Author

@arikfr May I ask you for a review?

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please see comment on error handling.

except Exception as ex:
json_data = None
error = 'error.{}.{}'.format(query, ex)
if not isinstance(error, basestring):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why error want be a basestring?

json_data = None
except Exception as ex:
json_data = None
error = 'error.{}.{}'.format(query, ex)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message is shown to the user and should be (to some degree) user friendly. Not sure this qualifies :)

Maybe returning just the exception message is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling is sufficient. Users can identify errors with code and message. Please refer to https://python-phoenixdb.readthedocs.io/en/latest/api.html#phoenixdb.Error.

@arikfr arikfr removed the Needs More Information Seen by a team member, not ready for a full review label Dec 26, 2018
@ghost ghost added the in progress label Jan 20, 2019
@combineads
Copy link
Contributor Author

@arikfr Thank you for your review.
I improved error handling.

@arikfr arikfr merged commit 71afc99 into getredash:master Mar 27, 2019
@arikfr
Copy link
Member

arikfr commented Mar 27, 2019

Thanks!

harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
* Add phoenix query runner.

* Improved error handling.
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