I’m new to ClickHouse and having an issue with MV. I have a record table which is the data source. I’m inserting all the data here. Then created another table called adv_general_report using mv_adv_general_report materialized view.
This is my schema.
The odd part is after inserting the data to record table, the sum of impression is perfectly adding to both adv_general_report and mv_adv_general_report materialized view but views and clicks are always showing zero.
You can see running this query. That showing amount of view
SELECT sum(views) as views from records;
But if you run this
select sum(views) as views from adv_general_report;
It’s 0 . also the select query used for a materialized view is showing the sum of view perfectly. Any idea why?
Best Answer