superset-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-superset] fan-code commented on issue #8027: hive/impala can't show table schema
Date Tue, 29 Sep 2020 03:31:00 GMT

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


Mime
View raw message