-
Notifications
You must be signed in to change notification settings - Fork 14.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
fix(hive): Remove unused async arg from execute query func to get hive connector working #24984
fix(hive): Remove unused async arg from execute query func to get hive connector working #24984
Conversation
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.
): # pylint: disable=arguments-differ | ||
kwargs = {"async": async_} | ||
cursor.execute(query, **kwargs) | ||
def execute(cursor, query: str): |
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.
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.
I have the latest python version and I'm getting errors with this kwarg not being recognized.
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.
raise SupersetErrorsException(superset-f79cd4889-88xps superset.exceptions.SupersetErrorsException: [SupersetError(message="databricks error: execute() got an unexpected keyword argument 'async'", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'Databricks Interactive Cluster', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
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.
What package and what version of that package should be required for this to work? This only happens when I try loading Unity Catalog data from Databricks in SQL Lab.
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.
My PyHive is up to date (0.6.5
) and python version is 3.9.17
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.
databricks+connector
works for me for schema selection as well. this is in 3.0.0.rc3 version
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.
@bkyryliuk are you able to see Unity Catalog schemas? Not just hive metastore schemas?
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.
Yes, I need to specify catalog in the connection string and see the schemas in the catalog:
conn string
databricks+connector://token:{token}@{host}:{port}/{catalog}?catalog={catalog}
{"connect_args":{"http_path":"/sql/1.0/warehouses/{id}","catalog":"{catalog}"}}
I got a bit lazy and did not fully figure out what setting is actually setting the catalog and I think that has changed over time with databricks connector
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.
Ah this works! I was getting both a little wrong - Is it possible to update the documentation on this so that others can connect to unity catalog?
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.
SUMMARY
Fixes this issue: #24786
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION