Skip to content

Conversation

@discord9
Copy link
Contributor

What's Changed in this PR

Describe the change in this PR

Checklist

  • Please confirm that all corresponding versions of the documents have been revised.
  • Please ensure that the content in sidebars.ts matches the current document structure when you changed the document structure.
  • This change requires follow-up update in localized docs.

Signed-off-by: discord9 <[email protected]>
@discord9 discord9 changed the title chore: update stat chore: update flow dev guide Oct 23, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 23, 2025

Deploying greptime-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a86cc35
Status: ✅  Deploy successful!
Preview URL: https://de1698fb.greptime-docs.pages.dev
Branch Preview URL: https://update-flow-dev-guide.greptime-docs.pages.dev

View logs

Signed-off-by: discord9 <[email protected]>
Signed-off-by: discord9 <[email protected]>
@discord9 discord9 marked this pull request as ready for review October 30, 2025 12:08

### Write a PromQL query

GreptimeDB Flow also supports using PromQL for continuous aggregation, allowing you to leverage familiar PromQL syntax for time-series analysis. When writing PromQL queries for Flow, it's crucial to specify an `eval interval` as PromQL doesn't have a fixed time window. This interval determines how frequently the PromQL query is evaluated and new aggregated results are generated.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't have a fixed time window?
does have a fixed time window?

- `prom_aggregated` is the sink table that will store the continuously aggregated results.
- `TQL EVAL (start, end, '1m')` indicates that the PromQL query `rate(http_requests_total{job="my_service"}[1m])` is evaluated with a `step` of 1 minute.
- The `rate` function calculates the per-second average rate of increase of the `http_requests_total` metric over the last 1 minutes.
- The results, including the calculated `value` and the `timestamp` (which corresponds to the evaluation timestamp), are then written to the `rate_reqs` sink table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When creating a PromQL flow, how to determine the sink table schema based on the flow?

## Architecture

The batching mode consists of several key components that work together to achieve this continuous aggregation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to have a image to describe the architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants