@@ -5,21 +5,9 @@ TOKEN "append" APPEND
55TAGS "mailgun"
66
77SCHEMA >
8- `date` DateTime `json:$.record.event-data.timestamp` DEFAULT now(),
9- `event` LowCardinality(String) `json:$.record.event-data.event` DEFAULT '',
10- `message_id` String `json:$.record.event-data.message.headers.message-id` DEFAULT '',
11- `recipient` String `json:$.record.event-data.recipient` DEFAULT '',
12- `recipient_domain` String `json:$.record.event-data.recipient-domain` DEFAULT '',
13- `tags` Array(String) `json:$.record.event-data.tags[:]` DEFAULT [],
14- `log_level` LowCardinality(String) `json:$.record.event-data.log-level` DEFAULT '',
15- `city` String `json:$.record.event-data.geolocation.city` DEFAULT '',
16- `country` String `json:$.record.event-data.geolocation.country` DEFAULT '',
17- `region` String `json:$.record.event-data.geolocation.region` DEFAULT '',
18- `client_info` JSON `json:$.record.event-data.client-info` DEFAULT '{}',
19- `delivery_status` JSON `json:$.record.event-data.delivery-status` DEFAULT '{}',
20- `envelope` JSON `json:$.record.event-data.envelope` DEFAULT '{}',
21- `user_variables` JSON `json:$.record.event-data.user-variables` DEFAULT '{}'
8+ `date` DateTime `json:$.timestamp` DEFAULT now(),
9+ `record` JSON `json:$` DEFAULT '{}'
2210
2311ENGINE "MergeTree"
2412ENGINE_PARTITION_KEY "toYYYYMM(date)"
25- ENGINE_SORTING_KEY "event, date"
13+ ENGINE_SORTING_KEY "date"
0 commit comments