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 2020/12/31 03:06:59 UTC

[GitHub] [incubator-superset] wxf163 opened a new issue #12231: can't insert with clickhouse datasource

wxf163 opened a new issue #12231:
URL: https://github.com/apache/incubator-superset/issues/12231


   clickhouse 20.3.18.10
   superset docker 0.28.1
   
   table::  create table t(id Int32, aa String)
   sql insert into testdb.t values(3,'cccc')
   
   
   
   log :
    
   2020-12-31 02:30:32,478:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): service-ck-test123008.ck-test123008-hd.test-test.testdomain.com
   2020-12-31 02:30:32,491:DEBUG:urllib3.connectionpool:http://service-ck-test123008.ck-test123008-hd.test-test.testdomain.com:8123 "POST /?database=default&user=testuser&password=AAAaaa111 HTTP/1.1" 200 None
   2020-12-31 02:30:32,492:INFO:root:Running query: 
   insert into testdb.t values(3,'cccc')
   2020-12-31 02:30:32,492:INFO:root:insert into testdb.t values(3,'cccc')
   2020-12-31 02:30:32,494:DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): service-ck-test123008.ck-test123008-hd.test-test.testdomain.com
   2020-12-31 02:30:32,507:DEBUG:urllib3.connectionpool:http://service-ck-test123008.ck-test123008-hd.test-test.testdomain.com:8123 "POST /?query_id=27d78240-4b10-11eb-b191-8a1bd80bcf85&database=default&user=testuser&password=AAAaaa111 HTTP/1.1" 500 None
   2020-12-31 02:30:32,507:ERROR:root:Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected ( before: FORMAT TabSeparatedWithNamesAndTypes:  at row 1 (version 20.3.18.10 (official build))
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/superset/sql_lab.py", line 182, in execute_sql
       db_engine_spec.execute(cursor, query.executed_sql, async_=True)
     File "/usr/local/lib/python3.6/site-packages/superset/db_engine_specs.py", line 385, in execute
       cursor.execute(query)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 210, in execute
       self._process_response(response)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 341, in _process_response
       for r in response:
     File "/usr/local/lib/python3.6/site-packages/infi/clickhouse_orm/database.py", line 218, in select
       r = self._send(query, settings, True)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy_clickhouse/connector.py", line 102, in _send
       raise Exception(r.text)
   Exception: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected ( before: FORMAT TabSeparatedWithNamesAndTypes:  at row 1 (version 20.3.18.10 (official build))
   


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


[GitHub] [incubator-superset] zhaoyongjie commented on issue #12231: can't insert with clickhouse datasource

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #12231:
URL: https://github.com/apache/incubator-superset/issues/12231#issuecomment-753727381


   @wxf163 
   Hi there, For the Clickhouse table, you need to specify the engine type, (Mergetree etc.  [Clickhouse tutorial)](https://clickhouse.tech/docs/en/getting-started/tutorial/)
   
   <img width="1021" alt="image" src="https://user-images.githubusercontent.com/2016594/103496193-4aa06600-4e78-11eb-927f-8586991c4b38.png">
   
   I use [`clickhouse-sqlalchemy`](https://github.com/xzkostyan/clickhouse-sqlalchemy) instead of `sqlalchemy-clickhouse`, and use `native` driver to connect Clickhouse instance.
   
   <img width="1324" alt="image" src="https://user-images.githubusercontent.com/2016594/103496363-eaf68a80-4e78-11eb-846e-4936735c4b6e.png">
   
   then allow DML in SQLLab.
   
   <img width="1331" alt="image" src="https://user-images.githubusercontent.com/2016594/103496403-0f526700-4e79-11eb-9475-1ae906ddc132.png">
   
   Hope it can help you.
   


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


[GitHub] [incubator-superset] zhaoyongjie edited a comment on issue #12231: can't insert with clickhouse datasource

Posted by GitBox <gi...@apache.org>.
zhaoyongjie edited a comment on issue #12231:
URL: https://github.com/apache/incubator-superset/issues/12231#issuecomment-753727381


   @wxf163 
   Hi there, For the Clickhouse table, you need to specify the engine type, (Mergetree etc.  [Clickhouse tutorial)](https://clickhouse.tech/docs/en/getting-started/tutorial/)
   
   <img width="1021" alt="image" src="https://user-images.githubusercontent.com/2016594/103496193-4aa06600-4e78-11eb-927f-8586991c4b38.png">
   
   I use [`clickhouse-sqlalchemy`](https://github.com/xzkostyan/clickhouse-sqlalchemy) instead of `sqlalchemy-clickhouse`, and use `native` driver connect to Clickhouse instance.
   
   <img width="1324" alt="image" src="https://user-images.githubusercontent.com/2016594/103496363-eaf68a80-4e78-11eb-846e-4936735c4b6e.png">
   
   then allow DML in SQLLab.
   
   <img width="1331" alt="image" src="https://user-images.githubusercontent.com/2016594/103496403-0f526700-4e79-11eb-9475-1ae906ddc132.png">
   
   Hope it can help you.
   


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