superset icon indicating copy to clipboard operation
superset copied to clipboard

clickhouse result no column header when using formatDateTime function

Open phpsxg opened this issue 2 years ago • 5 comments

A clear and concise description of what the bug is.

How to reproduce the bug

SQL Lab clickhouse result no column header when using formatDateTime function

abc bcd

Environment

  • browser type and version:
  • superset version: apache/superset:latest-dev
  • python version: 3.8.13
  • clickhouse-sqlalchemy 0.1.0
  • clickhouse-driver 0.2.0

phpsxg avatar Jul 11 '22 03:07 phpsxg

could you try upgrade clickhouse-sqlalchemy to 0.1.8 and check again?

Slach avatar Jul 15 '22 07:07 Slach

could you try upgrade clickhouse-sqlalchemy to 0.1.8 and check again?

Sorry, I wrote wrong, I used clickhouse-sqlalchem==0.1.9, there is this problem

phpsxg avatar Jul 15 '22 14:07 phpsxg

I have similar issue.

superset version: apache/superset:2.0.0 and apache/superset:1.5.1 clickhouse-sqlalchemy 0.1.6 clickhouse-driver 0.2.0

dzanto avatar Jul 18 '22 09:07 dzanto

clickhouse-driver==0.2.1 and clickhouse-sqlalchemy==0.1.9 fixed it

dzanto avatar Jul 18 '22 10:07 dzanto

Could you check this bug with https://github.com/ClickHouse/clickhouse-connect

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

Slach avatar Sep 18 '22 04:09 Slach

This seems to work just fine with ClickHouse Connect.

genzgd avatar Nov 02 '22 21:11 genzgd

in my case superset 2.0.1 helps: clickhouse-sqlalchemy==0.1.10 need to patch clickhouse_sqlalchemy/drivers/http/transport.py set params 'default_format' to: params['default_format'] = 'TabSeparatedWithNamesAndTypes' in method _send of class RequestsTransport

--- /usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/http/transport.py.orig
+++ /usr/local/lib/python3.8/site-packages/clickhouse_sqlalchemy/drivers/http/transport.py
@@ -164,6 +164,7 @@
         params = params or {}
         params['database'] = self.db_name
         params.update(self.ch_settings)
+        params['default_format'] = 'TabSeparatedWithNamesAndTypes'

         # TODO: retries, prepared requests
         r = self.http.post(

Paulo456 avatar Jul 17 '23 19:07 Paulo456

It sounds like this is likely fixed by now, and is pretty out of date if not. If people are still encountering this in current versions (3.x) please open a new Issue with updated context or a PR to address the problem. Thanks!

rusackas avatar Mar 08 '24 03:03 rusackas