Create GreptimeDB flow definition to do time window based aggregation on the fly
while data ingested into GreptimeDB. This is how GreptimeDB's lightweight
streaming engine works.
First, we read GreptimeDB flow definitions and how it works from the
documentation.
Create the flow and sink table DDL. Note that we will always provide
statement for sink table, together with the
statement
because it's required.
If greptimedb-mcp-server is available, we can use its
tools to
execute the DDL. Try to generate some sample data, insert into source table,
then verify the sink table via SQL SELECT statements. We can use MySQL style
SELECT statements on GreptimeDB for most cases.