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/07/07 05:39:37 UTC

[GitHub] [superset] phpsxg opened a new issue, #20633: Add dataset fail(clickhouse)

phpsxg opened a new issue, #20633:
URL: https://github.com/apache/superset/issues/20633

   
   The clickhouse database was added successfully, but the add dataset failed.
   mysql database has no such problem
   
   
   add dataset from clickhouse database error info:
   ```
   2022-07-07 11:27:43,305:ERROR:root:'NoneType' object has no attribute 'reflect'
   Traceback (most recent call last):
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/flask_appbuilder/api/__init__.py", line 85, in wraps
       return f(self, *args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/views/base_api.py", line 112, in wraps
       raise ex
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/views/base_api.py", line 109, in wraps
       duration, response = time_function(f, self, *args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/utils/core.py", line 1468, in time_function
       response = func(*args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/utils/log.py", line 245, in wrapper
       value = f(*args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/views/base_api.py", line 82, in wraps
       return f(self, *args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/datasets/api.py", line 257, in post
       new_model = CreateDatasetCommand(g.user, item).run()
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/datasets/commands/create.py", line 46, in run
       self.validate()
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/datasets/commands/create.py", line 86, in validate
       if database and not DatasetDAO.validate_table_exists(
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/datasets/dao.py", line 81, in validate_table_exists
       database.get_table(table_name, schema=schema)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/superset/models/core.py", line 671, in get_table
       return Table(
     File "<string>", line 2, in __new__
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 139, in warned
       return fn(*args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 563, in __new__
       metadata._remove_table(name, schema)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
       compat.raise_(
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 558, in __new__
       table._init(name, metadata, *args, **kw)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 647, in _init
       self._autoload(
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 670, in _autoload
       autoload_with.run_callable(
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2212, in run_callable
       return conn.run_callable(callable_, *args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1653, in run_callable
       return callable_(self, *args, **kwargs)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 829, in reflecttable
       self._reflect_engine(connection, table.name, table)
     File "/home/sxg/miniconda3/envs/superset/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/base.py", line 841, in _reflect_engine
       engine = engine_cls.reflect(table, **e)
   AttributeError: 'NoneType' object has no attribute 'reflect'
   ```
   
   #### Screenshots
   
   ![aaa](https://user-images.githubusercontent.com/19278211/177699102-905bd126-bcf2-424a-a8b3-804b9954b136.png)
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: ` 1.5.1`
   - python version: ` 3.8.13`
   - clickhouse-driver: ` 0.2.0`
   -  clickhouse-sqlalchemy: ` 0.1.6`


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


[GitHub] [superset] Slach commented on issue #20633: Add dataset fail(clickhouse)

Posted by GitBox <gi...@apache.org>.
Slach commented on issue #20633:
URL: https://github.com/apache/superset/issues/20633#issuecomment-1185281414

   could you try upgrade clickhouse-sqlalchemy to  0.1.8 ?


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


Re: [I] Add dataset fail(clickhouse) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #20633: Add dataset fail(clickhouse)
URL: https://github.com/apache/superset/issues/20633


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


[GitHub] [superset] andrewterentieff commented on issue #20633: Add dataset fail(clickhouse)

Posted by GitBox <gi...@apache.org>.
andrewterentieff commented on issue #20633:
URL: https://github.com/apache/superset/issues/20633#issuecomment-1184191942

   In my case on the same environment and adding logger.debug('engine: %s', e['engine']):
   839 if e['name'] == table_name:
      logger.debug('engine: %s', e['engine'])
   840   engine_cls = engine_cls_by_name.get(e['engine'])
   
   output was: engine PostgreSQL, this type is absent in engines.all enum


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


[GitHub] [superset] Slach commented on issue #20633: Add dataset fail(clickhouse)

Posted by GitBox <gi...@apache.org>.
Slach commented on issue #20633:
URL: https://github.com/apache/superset/issues/20633#issuecomment-1362509415

   better use clickhouse-connect instead of clickhouse-sqlalchemy now
   there is details
   https://gist.github.com/Slach/ad926dfa30ceb4fe1d168c00c3da98e0


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


[GitHub] [superset] ASchmidtGit commented on issue #20633: Add dataset fail(clickhouse)

Posted by GitBox <gi...@apache.org>.
ASchmidtGit commented on issue #20633:
URL: https://github.com/apache/superset/issues/20633#issuecomment-1361200875

   I've got the same problem but with sqlalchemy version 1.4.45 ans Superset 1.5.0


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


Re: [I] Add dataset fail(clickhouse) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #20633:
URL: https://github.com/apache/superset/issues/20633#issuecomment-1944799169

   Assuming the above comment is an acceptable solution since this has gone silent for so long. Closing, but happy to revisit as needed.


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