-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Error when using "TIME COLUMN" along with "X-AXIS" for same value for Clickhouse #23384
Comments
This annoying bug happens all the time. I hope it will be fixed soon. |
I have it too 🙁 |
alias after group by should not be the same with the raw column name. |
I know but such query generates Superset. I used a trick to solve this problem but it's inconvenient |
I have the same issue on version 2.1.0 when trying to use timestamp as dimension in Aggregate Table.
@NikoJ can you share your workaround? |
Still present in 3.0.1. The workaround above with setting a custom expression and alias works. |
Can be fixed on ClickHouse side, with override default value for property prefer_column_name_to_alias via user setting for default profile
|
Thanks @kovitals - if anyone else on this thread finds this to be a sufficient answer (or even a sufficient workaround), this would be a great documentation update on the Clickhouse docs page. A PR from anyone would be helpful on that point to close this out. |
@rusackas Thanks! When I have free time, I will check it and then close this issue as solved if everything is ok. |
Thanks, seems to work great! As an alternative, if someone else wants to add the setting via SQL-driven workflow, the below command sets up a new settings profile and assigns it to a user:
|
It seems this has been fixed on the CH side and this is no longer an issue. Closing, but happy to reopen if it's still an issue. |
When using
Mixed Chart
I encountered an Error when usingTIME COLUMN
along withX-AXIS
for the same value when the source isClickhouse
.The error looks like:
I found a mistake in the query generation for Clickhouse:
The alias specified in the select
SELECT toStartOfDay(toDateTime(dt)) AS dt
is then substituted for the section with groupingGROUP BY toStartOfDay(toDateTime(toStartOfDay(toDateTime(dt))))
.How to reproduce the bug
Database
withClickhouse Connect
Dataset
based on clickhouse dataChart
based onDataset
from p. 5 with chart type `Mixed ChartTIME COLUMN
=dt
TIME GRAIN
=Day
X-AXIS
=dt
METRICS
=SUM(id)
METRICS
=SUM(id)
Expected results
In my opinion there are two ways. Or generate a query with a different alias or substitute an alias in the grouping section.
Screenshots
Environment
Checklist
The text was updated successfully, but these errors were encountered: