Map ClickHouse DateTime('Europe/Berlin') to Metabase type/DateTime
gegl opened this issue · 3 comments
gegl commented
Describe the bug
When a ClickHouse DateTime is associated with a TimeZone after converting from UTC to TimeZone in a ClickHouse view, the resulting type DateTime('Europe/Berlin') is not mapped to Metabase type/DateTime. It falls back on type/*. This negatively affects UIs for filtering in Metabase.
Steps to reproduce
Use any column where a TimeZone version is applied eg. toTimeZone(, 'Europe/Berlin') :
SELECT toTimeZone(now(), 'Europe/Berlin') as date_time_with_timezone_conversion
The resulting ClickHouse data type is DateTime('Europe/Berlin')
according to DESC <table name>
When passed throuh the metabase-clickhouse-driver it is mapped to type/*
Expected behaviour
DateTime('Europe/Berlin') is mapped to type/DateTime
Configuration
Environment
- metabase-clickhouse-driver version: 1.1.2
- metabase-clickhouse-driver configuration:
- Metabase version: 0.46.6
- OS: Linux
ClickHouse server
- ClickHouse Server version: 23.4.2 revision 54462
CREATE TABLE
statements for tables involved:
CREATE VIEW membership_activations_view
(
`activation_datetime` DateTime('Europe/Berlin'),
`signup_datetime` DateTime('Europe/Berlin'),
....
) AS
SELECT
toTimeZone(activation_datetime, 'Europe/Berlin') AS activation_datetime,
toTimeZone(signup_datetime, 'Europe/Berlin') AS signup_datetime,
....
FROM membership_activations
brendavarguez commented
slvrtrn commented
@brendavarguez, if this issue still persists on 1.2.1, feel free to re-open this issue with more details.