Skip to content

Commit 8817a76

Browse files
authored
Merge pull request #2 from tinybirdco/resend
resend schema
2 parents e8bc229 + 3e3b759 commit 8817a76

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{"time":"2024-12-17 12:07:31.454","type":"email.delivered","data":{"created_at":"2024-12-17 12:07:30.55797+00","email_id":"96cca866-f697-4ec9-b4ed-abb1a38b7956","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]}}
2+
{"time":"2024-12-17 12:07:30.658","type":"email.sent","data":{"created_at":"2024-12-17 12:07:30.55797+00","email_id":"96cca866-f697-4ec9-b4ed-abb1a38b7956","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]}}
3+
{"time":"2024-12-17 12:07:20.756","type":"email.sent","data":{"created_at":"2024-12-17 12:07:20.671807+00","email_id":"93cb798e-54d8-4d4b-abef-4ada93501563","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]}}
4+
{"time":"2024-12-17 12:07:21.382","type":"email.delivered","data":{"created_at":"2024-12-17 12:07:20.671807+00","email_id":"93cb798e-54d8-4d4b-abef-4ada93501563","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]}}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{"time":"2024-12-17 10:09:23.786","record":{"created_at":"2024-12-17T10:09:23.786Z","data":{"created_at":"2024-12-17 10:09:23.683439+00","email_id":"643d70f4-a3bf-4ec0-a260-51d0d4dec179","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]},"type":"email.sent"}}
2+
{"time":"2024-12-17 10:09:24.451","record":{"created_at":"2024-12-17T10:09:24.451Z","data":{"created_at":"2024-12-17 10:09:23.683439+00","email_id":"643d70f4-a3bf-4ec0-a260-51d0d4dec179","from":"Acme <[email protected]>","subject":"hello world","to":["[email protected]"]},"type":"email.delivered"}}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
TOKEN "append" APPEND
2+
3+
# Refer to https://resend.com/docs/dashboard/webhooks/event-types
4+
5+
TAGS "resend"
6+
7+
SCHEMA >
8+
`time` DateTime64(3) `json:$.created_at` DEFAULT now(),
9+
`type` String `json:$.type`,
10+
`data` JSON `json:$.data`
11+
12+
ENGINE "MergeTree"
13+
ENGINE_PARTITION_KEY "toYear(time)"
14+
ENGINE_SORTING_KEY "time"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
TOKEN "append" APPEND
2+
3+
# Refer to https://resend.com/docs/dashboard/webhooks/event-types
4+
5+
TAGS "resend"
6+
7+
SCHEMA >
8+
`time` DateTime64(3) `json:$.created_at` DEFAULT now(),
9+
`record` JSON `json:$`
10+
11+
ENGINE "MergeTree"
12+
ENGINE_PARTITION_KEY "toYear(time)"
13+
ENGINE_SORTING_KEY "time"

0 commit comments

Comments
 (0)