Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map ClickHouse DateTime('Europe/Berlin') to Metabase type/DateTime #178

Closed
gegl opened this issue Jul 21, 2023 · 3 comments · Fixed by #181
Closed

Map ClickHouse DateTime('Europe/Berlin') to Metabase type/DateTime #178

gegl opened this issue Jul 21, 2023 · 3 comments · Fixed by #181
Assignees
Labels
bug Something isn't working

Comments

@gegl
Copy link

gegl commented Jul 21, 2023

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
@gegl gegl added the bug Something isn't working label Jul 21, 2023
@slvrtrn slvrtrn self-assigned this Jul 24, 2023
@slvrtrn
Copy link
Collaborator

slvrtrn commented Aug 1, 2023

Fixed in 1.2.0

@brendavarguez
Copy link

Hello! @slvrtrn I had a similar issue that you can find here. I understand that it should have been solved with Metabase version 0.47, but I'm already using 0.47.1 version and the issue persist. Should it be re-opened?

@slvrtrn
Copy link
Collaborator

slvrtrn commented Sep 22, 2023

@brendavarguez, if this issue still persists on 1.2.1, feel free to re-open this issue with more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants