Skip to content

Support ClickHouse Materialized View TO  #1312

Closed
@Bidaya0

Description

@Bidaya0

Clickhouse's view can use TO to specify that the data will be stored in the target table when it is created.
https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view

for example

CREATE MATERIALIZED VIEW analytics.monthly_aggregated_data_mv
TO analytics.monthly_aggregated_data
AS
SELECT
    toDate(toStartOfMonth(event_time)) AS month,
    domain_name,
    sumState(count_views) AS sumCountViews
FROM analytics.hourly_data
GROUP BY
    domain_name,
    month

I wish to add a TO parse on the view parser to parse this part.

TO analytics.monthly_aggregated_data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions