Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Create dub_program_import_log.datasource

Kiran K8d861fe9889a
diff --git a/packages/tinybird/datasources/dub_program_import_log.datasource b/packages/tinybird/datasources/dub_program_import_log.datasource
new file mode 100644
index 0000000000..c6c062763e
--- /dev/null
+++ b/packages/tinybird/datasources/dub_program_import_log.datasource
@@ -0,0 +1,17 @@
+# A datasource for logging program import records from external sources
+# Useful for debugging and tracking import issues
+
+SCHEMA >
+ `timestamp` DateTime64(3) `json:$.timestamp` DEFAULT now(),
+ `workspace_id` String `json:$.workspace_id`,
+ `import_id` String `json:$.import_id`,
+ `source` String `json:$.source`,
+ `entity` String `json:$.entity`,
+ `entity_id` String `json:$.entity_id`,
+ `code` String `json:$.code`,
+ `message` String `json:$.message`
+
+ENGINE "MergeTree"
+ENGINE_PARTITION_KEY "toYYYYMM(timestamp)"
+ENGINE_SORTING_KEY "timestamp, workspace_id"
+ENGINE_TTL "toDateTime(timestamp) + toIntervalDay(180)"
\ No newline at end of file