Last active
December 17, 2022 00:19
-
-
Save danthegoodman1/3023fa3e09abcea389ca575478fddee7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl \ | |
-H "Authorization: Bearer <TOKEN>" \ | |
-X POST "https://api.us-east.tinybird.co/v0/datasources" \ | |
-d "schema=timestamp DateTime64(3) \`json:$.timestamp\`, _metadata_bundledIds Array(Nullable(String)) \`json:$._metadata.bundledIds[:]\`, | |
_metadata_bundled Array(Nullable(String)) \`json:$._metadata.bundled[:]\`, _metadata_unbundled Array(Nullable(String)) | |
\`json:$._metadata.unbundled[:]\`, anonymousId Nullable(String) \`json:$.anonymousId\`, channel Nullable(String) \`json:$.channel\`, context | |
Nullable(String) \`json:$.context\`, messageId Nullable(String) \`json:$.messageId\`, originalTimestamp Nullable(DateTime64(3)) | |
\`json:$.originalTimestamp\`, projectId Nullable(String) \`json:$.projectId\`, receivedAt Nullable(DateTime64(3)) \`json:$.receivedAt\`, sentAt | |
Nullable(DateTime64(3)) \`json:$.sentAt\`, type Nullable(String) \`json:$.type\`, userId Nullable(String) \`json:$.userId\`, version Nullable(Int16) | |
\`json:$.version\`, properties Nullable(String) CODEC(ZSTD) \`json:$.properties\`, name Nullable(String) \`json:$.name\`, event Nullable(String) | |
\`json:$.event\`, traits Nullable(String) \`json:$.traits\`" \ | |
-d "engine=MergeTree" \ | |
-d "engine_sorting_key=timestamp" \ | |
-d "format=ndjson" \ | |
-d "engine_partition_key=toYYYYMM(timestamp)" \ | |
-d "name=<NAME>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment