You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/17 16:57:21 UTC
[GitHub] [superset] penghuo commented on issue #16509: Error loading tables from Hive2/SparkSQL
penghuo commented on issue #16509:
URL: https://github.com/apache/superset/issues/16509#issuecomment-1129103455
here is a quick fix in docker image.
```
# 1. edit docker images
docker run -u root -it apache/superset:latest-dev /bin/bash
# 2. edit phhive in shell
vim /usr/local/lib/python3.8/site-packages/pyhive/sqlalchemy_hive.py
change https://github.com/dropbox/PyHive/blob/master/pyhive/sqlalchemy_hive.py#L364
def get_table_names(self, connection, schema=None, **kw):
query = 'SHOW TABLES'
if schema:
query += ' IN ' + self.identifier_preparer.quote_identifier(schema)
return [row[1] for row in connection.execute(query)]
change https://github.com/dropbox/PyHive/blob/master/pyhive/sqlalchemy_hive.py#L314
if col_name == '# Partitioning':
# 3. in another console, commit the change
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
374249e4ac34 superset "/bin/bash" About a minute ago Up About a minute (unhealthy) 8088/tcp brave_jang
docker commit 374249e4ac34 superset-test
# 4. replace superset-image in docker-compose-non-dev.yml as superset-test
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org