Aggregations is essentially a materialized view in clickhouse. Syntax for creating an mv is like this:
CREATE MATERIALIZED VIEW <viewname>
TO <targettablename_version>
AS SELECT ... FROM <sourcetablename_version> ...
When new data lands in source table, the select clause gets executed and results are put in the target table. This trigger will only work on data that lands into source table after the mv is created.
If the user created a source table first, then days/weeks go by and there's data in there, but then they create an mv, existing data in source table will not trigger the mv. It could if the mv has the POPULATE clause, but clickhouse doesn't allow POPULATE & TO clauses to happen in the same query: https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view
This ticket is to investigate whether there's a workaround so user can specific the TO clause while also getting backfilled data into target table.
Aggregations is essentially a materialized view in clickhouse. Syntax for creating an mv is like this:
When new data lands in source table, the select clause gets executed and results are put in the target table. This trigger will only work on data that lands into source table after the mv is created.
If the user created a source table first, then days/weeks go by and there's data in there, but then they create an mv, existing data in source table will not trigger the mv. It could if the mv has the POPULATE clause, but clickhouse doesn't allow POPULATE & TO clauses to happen in the same query: https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view
This ticket is to investigate whether there's a workaround so user can specific the TO clause while also getting backfilled data into target table.