Skip to content
Open
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
15 changes: 5 additions & 10 deletions create_a_materialized_view_batch_ingest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,12 @@ DATASOURCE events_per_location_mv
`events_per_location_mv.datasource`:

```sql
NODE count_events_per_location
SQL >

SELECT
JSON_VALUE(payload, '$.location') AS location,
countState() AS hits
FROM analytics_events
GROUP BY location
SCHEMA >
`location` String,
`hits` AggregateFunction(count)

TYPE materialized
DATASOURCE events_per_location_mv
ENGINE "AggregatingMergeTree"
ENGINE_SORTING_KEY "location"
```

## 2: Create the Endpoint
Expand Down