elenamereloaxesor opened a new issue #14023: URL: https://github.com/apache/superset/issues/14023
I have already seen issues [#42](https://github.com/JohnOmernik/sqlalchemy-drill/issues/42), [#10032](https://github.com/apache/superset/issues/10032) and [#5063](https://github.com/apache/superset/issues/5063) but they don't solve my problem. I want to connect a GCS bucket to Superset so as to visualize the data and such. For that, I connected Drill to GCS, and then Drill to Superset, and when adding Drill as a database everything went ok. Everything is in a docker container, thus just doing docker-compose up makes Superset start. However, when i try to create a new dataset, `dfs.root`, `dfs.tmp`, `sys`, `information_schema` appear as schemas. If the first one is selected, in table_schema appears gcs, but amongst others i get the above-mentioned error. If i select `dfs.tmp`, i get drill as table_schema, but it doesn't work either. There are no problems selecting the other schemas, but gcs or my data is nowhere to be seen. ### Expected results I expected gcs to appear as schema. ### Actual results `dfs.root`, `dfs.tmp`, `sys`, `information_schema` appear as schemas, but not `gcs`, and `gcs` only appears as table_schema in dfs.root, but doesn't work. ### Additional context What the terminal produces: superset_app | DEBUG:superset.stats_logger:[stats_logger] (incr) extra_table_metadata superset_app | DEBUG:superset.stats_logger:[stats_logger] (incr) DatabaseRestApi.table_metadata.init superset_app | DEBUG:superset.models.core:Database.get_sqla_engine(). Masked URL: drill+sadrill://drill:8047/gcs?use_ssl=False superset_app | DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): drill:8047 superset_app | 172.29.0.1 - - [08/Apr/2021:09:47:53 +0000] "GET /superset/extra_table_metadata/1/gcs/dfs.root/ HTTP/1.1" 200 2 "http://localhost:8088/superset/sqllab/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36" superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 429 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 219 superset_app | DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): drill:8047 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 429 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 219 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 270 superset_app | DEBUG:root:Mapping column SCHEMA_NAME of Drill type VARCHAR to dtype string superset_app | DEBUG:root:Mapping column TYPE of Drill type VARCHAR to dtype string superset_app | DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): drill:8047 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 429 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 219 superset_app | DEBUG:urllib3.connectionpool:http://drill:8047 "POST /query.json HTTP/1.1" 200 192 superset_app | DEBUG:root:Mapping column TABLE_NAME of Drill type VARCHAR to dtype string superset_app | DEBUG:superset.stats_logger:[stats_logger] (incr) DatabaseRestApi.table_metadata.error superset_app | ERROR:root:module 'sqlalchemy_drill.drilldbapi' has no attribute 'Error' superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context superset_app | cursor, statement, parameters, context superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute superset_app | cursor.execute(statement, parameters) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_drill/drilldbapi/_drilldbapi.py", line 65, in func_wrapper superset_app | return func(self, *args, **kwargs) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_drill/drilldbapi/_drilldbapi.py", line 165, in execute superset_app | elif str(df[col_name].iloc[0]).startswith("[") and str(df[col_name].iloc[0]).endswith("]"): superset_app | File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 895, in __getitem__ superset_app | return self._getitem_axis(maybe_callable, axis=axis) superset_app | File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1501, in _getitem_axis superset_app | self._validate_integer(key, axis) superset_app | File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1444, in _validate_integer superset_app | raise IndexError("single positional indexer is out-of-bounds") superset_app | IndexError: single positional indexer is out-of-bounds superset_app | superset_app | During handling of the above exception, another exception occurred: superset_app | superset_app | Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/api/__init__.py", line 84, in wraps superset_app | return f(self, *args, **kwargs) superset_app | File "/app/superset/views/base_api.py", line 85, in wraps superset_app | raise ex superset_app | File "/app/superset/views/base_api.py", line 82, in wraps superset_app | duration, response = time_function(f, self, *args, **kwargs) superset_app | File "/app/superset/utils/core.py", line 1400, in time_function superset_app | response = func(*args, **kwargs) superset_app | File "/app/superset/utils/log.py", line 217, in wrapper superset_app | value = f(*args, **kwargs) superset_app | File "/app/superset/databases/api.py", line 488, in table_metadata superset_app | table_info = get_table_metadata(database, table_name, schema_name) superset_app | File "/app/superset/databases/utils.py", line 66, in get_table_metadata superset_app | columns = database.get_columns(table_name, schema_name) superset_app | File "/app/superset/models/core.py", line 619, in get_columns superset_app | return self.db_engine_spec.get_columns(self.inspector, table_name, schema) superset_app | File "/app/superset/db_engine_specs/base.py", line 866, in get_columns superset_app | return inspector.get_columns(table_name, schema) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/reflection.py", line 391, in get_columns superset_app | self.bind, table_name, schema, info_cache=self.info_cache, **kw superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_drill/base.py", line 382, in get_columns superset_app | views = self.get_view_names(connection, schema) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_drill/base.py", line 337, in get_view_names superset_app | curs = connection.execute("SELECT `TABLE_NAME` FROM INFORMATION_SCHEMA.views WHERE table_schema='" + schema + "'") superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2235, in execute superset_app | return connection.execute(statement, *multiparams, **params) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1003, in execute superset_app | return self._execute_text(object_, multiparams, params) superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1178, in _execute_text superset_app | parameters, superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context superset_app | e, statement, parameters, cursor, context superset_app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1390, in _handle_dbapi_exception superset_app | isinstance(e, self.dialect.dbapi.Error) superset_app | AttributeError: module 'sqlalchemy_drill.drilldbapi' has no attribute 'Error' superset_app | 172.29.0.1 - - [08/Apr/2021:09:47:53 +0000] "GET /api/v1/database/1/table/gcs/dfs.root/ HTTP/1.1" 500 31 "http://localhost:8088/superset/sqllab/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36" -- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
