question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with clickhouse source. Cannot create a dataset

See original GitHub issue

Updated as stated here https://superset.apache.org/docs/databases/clickhouse

How to reproduce the bug

  1. Followed instructions.
  2. Connected to database succesfully
  3. Was able to connect and get dataset from other tools
  4. Failed with adding dataset using superset
  5. Tried to clickhouse-sqlalchemy and sqlalchemy-clickhouse didn’t help

Expected results

Working dataset

Actual results

2021-10-05 19:35:02,803:DEBUG:clickhouse_driver.connection:Connecting. Database: default. User: labuser5 2021-10-05 19:35:02,804:DEBUG:clickhouse_driver.connection:Connecting to 10.11.12.13:9000 2021-10-05 19:35:02,807:DEBUG:clickhouse_driver.connection:Connected to ClickHouse server version 18.16.1, revision: 54412 2021-10-05 19:35:02,808:DEBUG:clickhouse_driver.connection:Query: select version() 2021-10-05 19:35:02,809:DEBUG:clickhouse_driver.connection:Block "" send time: 0.000187 2021-10-05 19:35:02,812:DEBUG:clickhouse_driver.connection:Connecting. Database: default. User: labuser5 2021-10-05 19:35:02,812:DEBUG:clickhouse_driver.connection:Connecting to 10.11.12.13:9000 2021-10-05 19:35:02,814:DEBUG:clickhouse_driver.connection:Connected to ClickHouse server version 18.16.1, revision: 54412 2021-10-05 19:35:02,815:DEBUG:clickhouse_driver.connection:Query: DESCRIBE TABLE default.cell_towers 2021-10-05 19:35:02,815:DEBUG:clickhouse_driver.connection:Block "" send time: 0.000207 2021-10-05 19:35:02,818:ERROR:root:Invalid enum member name: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 85, in wraps return f(self, *args, **kwargs) File "/app/superset/views/base_api.py", line 85, in wraps raise ex File "/app/superset/views/base_api.py", line 82, in wraps duration, response = time_function(f, self, *args, **kwargs) File "/app/superset/utils/core.py", line 1461, in time_function response = func(*args, **kwargs) File "/app/superset/utils/log.py", line 242, in wrapper value = f(*args, **kwargs) File "/app/superset/datasets/api.py", line 252, in post new_model = CreateDatasetCommand(g.user, item).run() File "/app/superset/datasets/commands/create.py", line 46, in run self.validate() File "/app/superset/datasets/commands/create.py", line 86, in validate if database and not DatasetDAO.validate_table_exists( File "/app/superset/datasets/dao.py", line 81, in validate_table_exists database.get_table(table_name, schema=schema) File "/app/superset/models/core.py", line 645, in get_table return Table( File "<string>", line 2, in new File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 139, in warned return fn(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 563, in new metadata._remove_table(name, schema) File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit compat.raise_( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_ raise exception File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 558, in new table._init(name, metadata, *args, **kw) File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 647, in _init self._autoload( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 670, in _autoload autoload_with.run_callable( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2212, in run_callable return conn.run_callable(callable_, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1653, in run_callable return callable_(self, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 825, in reflecttable rv = super(ClickHouseDialect, self).reflecttable( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 484, in reflecttable return insp.reflecttable( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 664, in reflecttable for col_d in self.get_columns( File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 390, in get_columns col_defs = self.dialect.get_columns( File "<string>", line 2, in get_columns File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/reflection.py", line 52, in cache ret = fn(self, con, *args, **kw) File "/usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 863, in get_columns return [self._get_column_info(row.name, row.type) for row in rows] File "/usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 863, in <listcomp> return [self._get_column_info(row.name, row.type) for row in rows] File "/usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 866, in _get_column_info col_type = self._get_column_type(name, format_type) File "/usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 908, in _get_column_type type_enum = enum.Enum('%s_enum' % name, options) File "/usr/local/lib/python3.8/enum.py", line 341, in call return cls._create_( File "/usr/local/lib/python3.8/enum.py", line 465, in _create_ enum_class = metacls.__new__(metacls, class_name, bases, classdict) File "/usr/local/lib/python3.8/enum.py", line 185, in new raise ValueError('Invalid enum member name: {0}'.format( ValueError: Invalid enum member name: 127.0.0.1 - - [05/Oct/2021:19:35:02 +0000] "POST /api/v1/dataset/ HTTP/1.1" 500 26 "http://127.0.0.1:53755/tablemodelview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36" 127.0.0.1 - - [05/Oct/2021:19:35:02 +0000] "GET /static/assets/73f05b21ea1ababa1228.chunk.js HTTP/1.1" 200 1052 "http://127.0.0.1:53755/tablemodelview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36"

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
afpdcommented, Oct 7, 2021
0reactions
DanRoscignocommented, Aug 31, 2022

If you still have a problem connecting, this document uses a different connector, I tested it last night with Superset 2.0.0 and ClickHouse 22.8:

https://clickhouse.com/docs/en/connect-a-ui/superset-and-clickhouse

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | ClickHouse Docs
If the server is not running, start it with the command: $ sudo service clickhouse-server start. Check logs. The main log of clickhouse-server...
Read more >
CREATE TABLE | ClickHouse Docs
Creates a table named table_name in the db database or the current database if db is not set, with the structure specified in...
Read more >
Getting Started Guide for Building ClickHouse
ClickHouse cannot work or build on a 32-bit system. You should acquire access to a 64-bit system and you can continue reading.
Read more >
Dictionary Sources | ClickHouse Docs
If you are using a dictionary with ClickHouse Cloud please use the DDL query option to create your dictionaries, and create your dictionary...
Read more >
Installing ClickHouse | ClickHouse Docs
The simplest way to download ClickHouse locally is to run the following command. ... Creating log directory /var/log/clickhouse-server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found