GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.33k stars 314 forks source link

Tracking issue for dataflow framework #3187

Closed discord9 closed 5 months ago

discord9 commented 10 months ago

What problem does the new feature solve?

Being able to do simple continuous aggregation.

What does the feature do?

Implementation challenges

tisonkun commented 8 months ago

@discord9 I read the RFC now and wonder what's a completed sample for this feature.

I can see how to create a task (continuous query/materialize view):

CREATE TASK avg_over_5m WINDOW_SIZE = "5m" AS SELECT avg(value) FROM table WHERE time > now() - 5m GROUP BY time(1m)

Then we can use avg_over_5m as a normal table reference in query?

discord9 commented 7 months ago

@discord9 I read the RFC now and wonder what's a completed sample for this feature.

I can see how to create a task (continuous query/materialize view):

CREATE TASK avg_over_5m WINDOW_SIZE = "5m" AS SELECT avg(value) FROM table WHERE time > now() - 5m GROUP BY time(1m)

Then we can use avg_over_5m as a normal table reference in query?

Yes, sorry for the late reply, github's layout for issues is really terrible, this task also create a result table avg_over_5m and write to it with negligible delay, so naturally one can use avg_over_5m in normal query

killme2008 commented 5 months ago

@discord9 I think we can close this issue right now. The next iteration could start with a new issue. What do you think?

discord9 commented 5 months ago

Close this issue as now have a basic dataflow framework, and can start a new issue to track it's next iteration