-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Open
Feature
Copy link
Labels
driver:clickhouseIssues related to the ClickHouse driverIssues related to the ClickHouse driverhelp wantedCommunity contributions are welcome.Community contributions are welcome.
Description
Describe the bug
Using original_sql
pre aggregation on ClickHouse driver doesn't work, due to CREATE AS SELECT
operation not supported with Replicated databases.
Expected behavior
Using original_sql
pre aggregation type on clickhouse driver should work on any database type, including Replicated one.
Minimally reproducible Cube Schema
- name: users_auto_complete_props
sql: >
select property_name, property_value, any(tenantId) as tenantId, max(date) as date from
(SELECT tenantId,
toDate(eventTime / 1000) date,
arrayJoin(JSONExtractKeys(ifNull(props, ''))) AS property_name,
JSONExtractString(props, property_name) AS property_value
From coho_db."users_replacing" where
tenantId = '{{ COMPILE_CONTEXT.securityContext.tenantId | safe }}' and
date > DATEADD(DAY,-2,today())
AND date < today() and props is not null and property_value is not null)
group by property_name, property_value
dimensions:
- name: property_name
type: string
sql: property_name
- name: date
type: time
sql: date
- name: property_value
type: string
sql: property_value
- name: tenant_id
type: string
sql: tenantId
public: false
pre_aggregations:
- name: live
type: rollup_lambda
union_with_source_data: true
rollups:
- CUBE.batch
- name: batch
type: original_sql
time_dimension: CUBE.date
partition_granularity: month
refresh_key:
every: 1 day
indexes:
- name: main_index
columns:
- tenant_id
- property_name
Version:
0.35.54
Metadata
Metadata
Assignees
Labels
driver:clickhouseIssues related to the ClickHouse driverIssues related to the ClickHouse driverhelp wantedCommunity contributions are welcome.Community contributions are welcome.