Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/connect-data-in.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Connect Data In

## Overview

Timeplus supports multiple ways to load data into the system, or access the external data without copying them in Timeplus:

- [External Stream for Apache Kafka](/external-stream), Confluent, Redpanda, and other Kafka API compatible data streaming platform. This feature is also available in Timeplus Proton.
Expand Down
6 changes: 3 additions & 3 deletions docs/usecases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ group by window_start,window_end`

```sql
SELECT cid,window_start,window_end,max(total_km)-min(total_km) AS trip_km
FROM session(car_live_data, time, 5s, cid)
GROUP BY __tp_session_id, cid, window_start, window_end
FROM session(car_live_data, time, 5s)
GROUP BY cid, window_start, window_end
HAVING trip_km > 0
```

Expand All @@ -257,7 +257,7 @@ More complex queries can be created to aggregate the data by car id and trip end
```sql
with query_1 AS (
select cid,window_start AS w_start,window_end AS w_end,max(total_km)-min(total_km) AS trip_km
from session(car_live_data,time,20m, cid) group by __tp_session_id, cid, window_start, window_end
from session(car_live_data,time,20m) group by cid, window_start, window_end
)
select cid,window_start,window_end,sum(trip_km)
from tumble(query_1,w_end,1h) group by cid,window_start,window_end
Expand Down