File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ TOKEN "append" APPEND
2+
3+ # Refer to https://mailgun-docs.redoc.ly/docs/mailgun/user-manual/events/#event-structure
4+
5+ TAGS "mailgun"
6+
7+ SCHEMA >
8+ `date` DateTime `json:$.record.event-data.timestamp`,
9+ `event` LowCardinality(String) `json:$.record.event-data.event`,
10+ `message_id` String `json:$.record.event-data.message.headers.message-id` DEFAULT '',
11+ `recipient` String `json:$.record.event-data.recipient`,
12+ `recipient_domain` String `json:$.record.event-data.recipient-domain`,
13+ `tags` Array(String) `json:$.record.event-data.tags`,
14+ `log_level` LowCardinality(String) `json:$.record.event-data.log-level`,
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 '{}'
22+
23+ ENGINE "MergeTree"
24+ ENGINE_PARTITION_KEY "toYYYYMM(timestamp)"
25+ ENGINE_SORTING_KEY "event, timestamp"
You can’t perform that action at this time.
0 commit comments