Skip to content

Commit e3998f7

Browse files
authored
Merge pull request #3 from tinybirdco/clerk
clerk schemas
2 parents 8817a76 + 8d6791e commit e3998f7

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
TOKEN "append" APPEND
2+
3+
# Refer to https://clerk.com/docs/webhooks/overview#payload-structure
4+
5+
TAGS "clerk"
6+
7+
SCHEMA >
8+
`time` DateTime64(3) `json:$.timestamp` DEFAULT now(),
9+
`data` JSON `json:$.data`,
10+
`event_attributes` JSON `json:$.event_attributes`,
11+
`object` String `json:$.object`,
12+
`type` String `json:$.type`
13+
14+
ENGINE "MergeTree"
15+
ENGINE_PARTITION_KEY "toYear(time)"
16+
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://clerk.com/docs/webhooks/overview#payload-structure
4+
5+
TAGS "clerk"
6+
7+
SCHEMA >
8+
`time` DateTime64(3) `json:$.timestamp` DEFAULT now(),
9+
`record` JSON `json:$`
10+
11+
ENGINE "MergeTree"
12+
ENGINE_PARTITION_KEY "toYear(time)"
13+
ENGINE_SORTING_KEY "time"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{"time":"2022-05-31 15:56:31.835","data":{"birthday":"","created_at":1654012591514,"email_addresses":[{"email_address":"[email protected]","id":"idn_29w83yL7CwVlJXylYLxcslromF1","linked_to":[],"object":"email_address","verification":{"status":"verified","strategy":"ticket"}}],"external_accounts":[],"external_id":"567772","first_name":"Example","gender":"","id":"user_29w83sxmDNGwOuEthce5gg56FcC","image_url":"https:\/\/img.clerk.com\/xxxxxx","last_name":"Example","last_sign_in_at":1654012591514,"object":"user","password_enabled":true,"phone_numbers":[],"primary_email_address_id":"idn_29w83yL7CwVlJXylYLxcslromF1","profile_image_url":"https:\/\/www.gravatar.com\/avatar?d=mp","two_factor_enabled":false,"updated_at":1654012591835,"web3_wallets":[]},"event_attributes":{"http_request":{"client_ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/128.0.0.0 Safari\/537.36"}},"object":"event","type":"user.created"}
2+
{"time":"2022-05-31 16:25:18.503","data":{"abandon_at":1656606318265,"client_id":"client_29wBS3h1zhE1BsEK2dg9oyypfYk","created_at":1654014318265,"expire_at":1654619118265,"id":"sess_29wBYxnMCQU2KIs6V3ZPOJCPUXx","last_active_at":1654014318265,"object":"session","status":"active","updated_at":1654014318503,"user_id":"user_29wBMCtzATuFJut8jO2VNTVekS4"},"event_attributes":{"http_request":{"client_ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/128.0.0.0 Safari\/537.36"}},"object":"event","type":"session.created"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"time":"2022-05-31 15:56:31.835","record":{"data":{"birthday":"","created_at":1654012591514,"email_addresses":[{"email_address":"[email protected]","id":"idn_29w83yL7CwVlJXylYLxcslromF1","linked_to":[],"object":"email_address","verification":{"status":"verified","strategy":"ticket"}}],"external_accounts":[],"external_id":"567772","first_name":"Example","gender":"","id":"user_29w83sxmDNGwOuEthce5gg56FcC","image_url":"https:\/\/img.clerk.com\/xxxxxx","last_name":"Example","last_sign_in_at":1654012591514,"object":"user","password_enabled":true,"phone_numbers":[],"primary_email_address_id":"idn_29w83yL7CwVlJXylYLxcslromF1","profile_image_url":"https:\/\/www.gravatar.com\/avatar?d=mp","two_factor_enabled":false,"updated_at":1654012591835,"web3_wallets":[]},"event_attributes":{"http_request":{"client_ip":"0.0.0.0","user_agent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/128.0.0.0 Safari\/537.36"}},"object":"event","timestamp":1654012591835,"type":"user.created"}}

0 commit comments

Comments
 (0)