Skip to content

Commit 1bdc596

Browse files
authored
Increase datapoint limit to 100 for Workers Analytics Engine
Updated the Workers Analytics Engine to allow writing up to 100 datapoints per invocation
1 parent 7744b3e commit 1bdc596

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Write up to 100 datapoints to Workers Analytics Engine per Workers invocation
3+
description: You can now write up to 100 datapoints (previously 25) to Workers Analytics Engine per Workers invocation (request)
4+
5+
products:
6+
- workers
7+
- analytics-engine
8+
date: 2025-10-30
9+
---
10+
11+
You can now write up to 100 [datapoints](/analytics/analytics-engine/get-started/#2-write-data-points-from-your-worker) (previously 25) to [Workers Analytics Engine](analytics/analytics-engine/) per Workers invocation (request)
12+
13+
Workers Analytics Engine provides unlimited-cardinality analytics at scale, via a built-in API to write data points from Workers, and a SQL API to query that data.
14+
15+
You can write data from your Worker:
16+
17+
```ts
18+
async fetch(request, env) {
19+
env.WEATHER.writeDataPoint({
20+
'blobs': ["Seattle", "USA", "pro_sensor_9000"], // City, State
21+
'doubles': [25, 0.5],
22+
'indexes': ["a3cd45"]
23+
});
24+
return new Response("OK!");
25+
}
26+
```
27+
28+
And then query it via a [SQL API](/analytics/analytics-engine/sql-reference/statements/)
29+
30+
```sql
31+
SELECT
32+
blob1 AS city,
33+
SUM(_sample_interval * double2) / SUM(_sample_interval) AS avg_humidity
34+
FROM WEATHER
35+
WHERE double1 > 0
36+
GROUP BY city
37+
ORDER BY avg_humidity DESC
38+
LIMIT 10
39+
```
40+
41+
Head over to the [Workers Analytics Engine documentation](/analytics/analytics-engine/) to learn more about Analytics Engine.

0 commit comments

Comments
 (0)