timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

[Enhancement]: Error message when creating a continuous aggregate

Open ollz272 opened this issue 1 year ago • 2 comments

What type of enhancement is this?

User experience

What subsystems and features will be improved?

Continuous aggregate

What does the enhancement do?

When trying to create a continous aggregate with multiple joins (which, as far as im aware, isn't supported), we get this error message:

CREATE MATERIALIZED VIEW my_view WITH (timescaledb.continuous) AS
SELECT
	time_bucket('P1D', data.time) as bucket,
	table.other_id,
	table2.property,
	avg(data.value) as value
FROM
	data
INNER JOIN table ON table.id = data.id
INNER JOIN table2 ON table2.id = data.id
GROUP BY bucket, table.other_id, table2.property
WITH NO DATA
...
ERROR:  Sub-queries are not supported in FROM clause.invalid continuous aggregate view 

ERROR:  invalid continuous aggregate view
SQL state: 0A000
Detail: Sub-queries are not supported in FROM clause.

Which doesn't seem particularly helpful 😓

Implementation challenges

No response

ollz272 avatar Jun 29 '23 02:06 ollz272

Any progress with this issue?

goodkiller avatar Feb 16 '24 14:02 goodkiller

I might be late :) https://docs.timescale.com/use-timescale/latest/continuous-aggregates/about-continuous-aggregates/#continuous-aggregates-with-a-join-clause Multiple joins are not supported :cry:

VBrueggemann avatar Apr 29 '24 16:04 VBrueggemann