The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add datasource and pipes
Kiran K14d23d26b06b
diff --git a/packages/tinybird/datasources/dub_lead_events_mv.datasource b/packages/tinybird/datasources/dub_lead_events_mv.datasourceindex e69de29bb2..d75e5d77e1 100644--- a/packages/tinybird/datasources/dub_lead_events_mv.datasource+++ b/packages/tinybird/datasources/dub_lead_events_mv.datasource@@ -0,0 +1,19 @@+SCHEMA >+ `timestamp` DateTime,+ `event_id` String,+ `click_id` String,+ `link_id` String,+ `customer_id` String,+ `event_name` LowCardinality(String),+ `metadata` String,+ `url` String,+ `country` LowCardinality(String),+ `city` String,+ `device` LowCardinality(String),+ `browser` LowCardinality(String),+ `os` LowCardinality(String),+ `referer` String++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(timestamp)"+ENGINE_SORTING_KEY "timestamp, url, city, referer"diff --git a/packages/tinybird/datasources/dub_sale_events_mv.datasource b/packages/tinybird/datasources/dub_sale_events_mv.datasourcenew file mode 100644index 0000000000..497e08244f--- /dev/null+++ b/packages/tinybird/datasources/dub_sale_events_mv.datasource@@ -0,0 +1,21 @@+# Data Source created from Pipe 'dub_sale_events_pipe'++SCHEMA >+ `timestamp` DateTime,+ `event_id` String,+ `click_id` String,+ `link_id` String,+ `customer_id` String,+ `payment_processor` LowCardinality(String),+ `amount` UInt32,+ `url` String,+ `country` LowCardinality(String),+ `city` String,+ `device` LowCardinality(String),+ `browser` LowCardinality(String),+ `os` LowCardinality(String),+ `referer` String++ENGINE "MergeTree"+ENGINE_PARTITION_KEY "toYYYYMM(timestamp)"+ENGINE_SORTING_KEY "timestamp, url, city, referer"diff --git a/packages/tinybird/pipes/dub_lead_events_pipe.pipe b/packages/tinybird/pipes/dub_lead_events_pipe.pipenew file mode 100644index 0000000000..8ca619eaa0--- /dev/null+++ b/packages/tinybird/pipes/dub_lead_events_pipe.pipe@@ -0,0 +1,24 @@+NODE mv+SQL >++ SELECT+ timestamp,+ event_id,+ click_id,+ link_id,+ customer_id,+ event_name,+ metadata,+ url,+ country,+ city,+ device,+ browser,+ os,+ referer,+ FROM dub_lead_events++TYPE materialized+DATASOURCE dub_lead_events_mv++diff --git a/packages/tinybird/pipes/dub_sale_events_pipe.pipe b/packages/tinybird/pipes/dub_sale_events_pipe.pipenew file mode 100644index 0000000000..2cd8a022b0--- /dev/null+++ b/packages/tinybird/pipes/dub_sale_events_pipe.pipe@@ -0,0 +1,24 @@+NODE mv+SQL >++ SELECT+ timestamp,+ event_id,+ click_id,+ link_id,+ customer_id,+ payment_processor,+ amount,+ url,+ country,+ city,+ device,+ browser,+ os,+ referer,+ FROM dub_sale_events++TYPE materialized+DATASOURCE dub_sale_events_mv++