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/08/13 00:43:40 UTC

[GitHub] [superset] vigodeltoro opened a new issue, #21078: Issue to implement Clickhouse DB driver in docker container

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

   Hi folks, 
   maybe there is somebody out there, who can help me.. it would be very appreciated..
   
   I tried to add the dlickhouse-driver and  clickhouse-sqlalchemy to my superset instance running in docker.
   As described ( https://superset.apache.org/docs/databases/docker-add-drivers/ ) I added the docker/requirements-local.txt file with the following content:
   
   clickhouse-driver==0.2.0
   clickhouse-sqlalchemy==0.1.6
   
   And then I run docker-compose build --force-rm
   
   If start superset after that ( dev or non-dev, doesn't matter ) I got that error every time Superset tries to connect to a DB. 
   
   Everytime I 
   superset_app            | [2022-08-13 00:30:13 +0000] [14] [INFO] Booting worker with pid: 14
   superset_worker         | Usage: celery [OPTIONS] COMMAND [ARGS]...
   superset_worker         | Try 'celery --help' for help.
   superset_worker         |
   superset_worker         | Error: Invalid value for '-A' / '--app':
   superset_worker         | Unable to load celery application.
   superset_worker         | While trying to load the module superset.tasks.celery_app:app the following error occurred:
   superset_worker         | Traceback (most recent call last):
   superset_worker         |   File "/usr/local/lib/python3.8/site-packages/celery/bin/celery.py", line 53, in convert
   superset_worker         |     return find_app(value)
   superset_worker         |   File "/usr/local/lib/python3.8/site-packages/celery/app/utils.py", line 384, in find_app
   superset_worker         |     sym = symbol_by_name(app, imp=imp)
   superset_worker         |   File "/usr/local/lib/python3.8/site-packages/kombu/utils/imports.py", line 56, in symbol_by_name
   superset_worker         |     module = imp(module_name, package=package, **kwargs)
   superset_worker         |   File "/usr/local/lib/python3.8/site-packages/celery/utils/imports.py", line 100, in import_from_cwd
   superset_worker         |     return imp(module, package=package)
   superset_worker         |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
   superset_worker         |     return _bootstrap._gcd_import(name[level:], package, level)
   superset_worker         |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
   superset_worker         |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
   superset_worker         |   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
   superset_worker         |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   superset_worker         |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
   superset_worker         |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
   superset_worker         |   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
   superset_worker         |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   superset_worker         |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
   superset_worker         |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
   superset_worker         |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
   superset_worker         |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
   superset_worker         |   File "<frozen importlib._bootstrap_external>", line 843, in exec_module
   superset_worker         |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
   superset_worker         |   File "/app/superset/__init__.py", line 21, in <module>
   superset_worker         |     from superset.app import create_app
   superset_worker         |   File "/app/superset/app.py", line 23, in <module>
   superset_worker         |     from superset.initialization import SupersetAppInitializer
   superset_worker         |   File "/app/superset/initialization/__init__.py", line 32, in <module>
   superset_worker         |     from superset.extensions import (
   superset_worker         |   File "/app/superset/extensions/__init__.py", line 33, in <module>
   superset_worker         |     from superset.utils.encrypt import EncryptedFieldFactory
   superset_worker         |   File "/app/superset/utils/encrypt.py", line 23, in <module>
   superset_worker         |     from sqlalchemy.engine import Connection, Dialect, Row
   superset_worker         | ImportError: cannot import name 'Row' from 'sqlalchemy.engine' (/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/__init__.py)
   
   I tried it by adding a layer in a Dockerfile as well:
   
   FROM apache/superset:latest
   # Switching to root to install the required packages
   USER root
   # Example: installing the Clickhouse driver to connect to the metadata database
   RUN apt-get -y update && apt-get -y upgrade
   RUN pip3 install clickhouse-driver==0.2.0 && pip3 install clickhouse-sqlalchemy==0.1.6
   
   # Switching back to using the `superset` user
   USER superset
   
   Same behavior with Image apache/superset:2.0.0.
   
   If I clone the Superset repo and run docker-compose up.. everything works.. but I need the Clickhouse connector.. 
   
   Tested in Docker and Kubernetes with helm.. same result.. In Kubernetes the Superset Pod is running but the initcontainer are in error state with that error.
   
   BTW: I was working with Superset 1.5.3 before and connection was working. 
   
   Does anybody has an idea  ? 
   
   best regards and many thanks..
   
   


-- 
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] rinh commented on issue #21078: Issue to implement Clickhouse DB driver in docker container

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

   hi,  vigodeltoro,  you can use the latest version and it did work. 
   
   pip install clickhouse-driver==0.2.4 && pip install clickhouse-sqlalchemy==0.2.1


-- 
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] vigodeltoro commented on issue #21078: Issue to implement Clickhouse DB driver in docker container

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

   Hi rinn.. 
   
   ah super.. it is working now :).. thanks a lot.. this should be added to documentation.. 
   
   best regards


-- 
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] vigodeltoro closed issue #21078: Issue to implement Clickhouse DB driver in docker container

Posted by GitBox <gi...@apache.org>.
vigodeltoro closed issue #21078: Issue to implement Clickhouse DB driver in docker container
URL: https://github.com/apache/superset/issues/21078


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