Live aggregation with legacy table
I am trying to use count(*) in one of the projection's columns. Always getting "Cannot create... : no suitable anchor projection).
All the examples that I've been able to find are using count(column_name). In my case there are no numeric type columns in the table...
Here is what I tried:
-- Original query:
SELECT id, timestamp, count(*) as n from original_table; -- OK, but I want a projection
-- Creating anchor projection as per documentation:
CREATE PROJECTION original_table_a as select id, timestamp, 0 as n from original_table;
SELECT MARK_DESIGN_KSAFE(0); -- I have a single node
-- Creating my target LAP:
CREATE PROJECTION original_table_lap
AS SELECT id, timestamp, count(*) as n from original_table
GROUP BY id, timestamp;
At this point I'm getting the "... no suitable anchor projection"