You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create_table"aggregated_events",id: false,options: "SummingMergeTree ORDER BY (name, date) SETTINGS index_granularity = 8192",force: :cascadedo |t|
27
+
t.string"name",null: false
28
+
t.date"date",null: false
29
+
t.integer"total_quantity",limit: 8,null: false
30
+
t.integer"event_count",limit: 8,null: false
31
+
end
32
+
33
+
create_table"aggregated_events_mv",view: true,materialized: true,to: "#{database}.aggregated_events",id: false,as: "SELECT name, created_at AS date, sum(quantity) AS total_quantity, count() AS event_count FROM #{database}.events GROUP BY name, created_at",force: :cascadedo |t|
expect(result.squish).toeq('CREATE MATERIALIZED VIEW default.aggregated_events_mv TO default.aggregated_events ( `name` String, `date` Date, `total_quantity` UInt64, `event_count` UInt64 ) AS SELECT name, created_at AS date, sum(quantity) AS total_quantity, count() AS event_count FROM default.events GROUP BY name, created_at')
0 commit comments