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 2020/09/29 03:31:00 UTC

[GitHub] [incubator-superset] fan-code commented on issue #8027: hive/impala can't show table schema

fan-code commented on issue #8027:
URL: https://github.com/apache/incubator-superset/issues/8027#issuecomment-700404517


   > well, it's a matter about sparksql .
   > it's finally solved by
   > edit site-packages/impala/sqlalchemy.py
   > from
   > 
   > ```
   > def get_table_names(self, connection, schema=None, **kw):
   >     query = 'SHOW TABLES'
   >     if schema is not None:
   >         query += ' IN %s' % schema
   >     rreturn [tup[0] for tup in connection.execute(query).fetchall()]
   > ```
   > 
   > to
   > 
   > ```
   >     def get_table_names(self, connection, schema=None, **kw):
   >         query = 'SHOW TABLES'
   >         if schema is not None:
   >             query += ' IN %s' % schema
   >         return [t[1] if len(t) >1  else t[0] for t in connection.execute(query).fetchall()]
   > ```
   
    the path 'site-packages/impala/sqlalchemy.py'  doesn't exsit if you just install pyhive,. So how to edit it?


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

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