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.

arrayIntersect

Steven Tey1e0397a9501f
diff --git a/packages/tinybird/pipes/v1_browsers.pipe b/packages/tinybird/pipes/v1_browsers.pipe
index fbefb6d629..813255f9ca 100644
--- a/packages/tinybird/pipes/v1_browsers.pipe
+++ b/packages/tinybird/pipes/v1_browsers.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_cities.pipe b/packages/tinybird/pipes/v1_cities.pipe
index ea719f4010..ffda145049 100644
--- a/packages/tinybird/pipes/v1_cities.pipe
+++ b/packages/tinybird/pipes/v1_cities.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_continents.pipe b/packages/tinybird/pipes/v1_continents.pipe
index 4d05af729d..25c6ce1d7c 100644
--- a/packages/tinybird/pipes/v1_continents.pipe
+++ b/packages/tinybird/pipes/v1_continents.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_count.pipe b/packages/tinybird/pipes/v1_count.pipe
index f4a38f4080..ad05d8f11f 100644
--- a/packages/tinybird/pipes/v1_count.pipe
+++ b/packages/tinybird/pipes/v1_count.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_countries.pipe b/packages/tinybird/pipes/v1_countries.pipe
index 8c2e88ce66..c4fc3d117b 100644
--- a/packages/tinybird/pipes/v1_countries.pipe
+++ b/packages/tinybird/pipes/v1_countries.pipe
@@ -20,7 +20,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_devices.pipe b/packages/tinybird/pipes/v1_devices.pipe
index 23fcf82f4e..211004a686 100644
--- a/packages/tinybird/pipes/v1_devices.pipe
+++ b/packages/tinybird/pipes/v1_devices.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_events.pipe b/packages/tinybird/pipes/v1_events.pipe
index 0fcf50c530..f3237a0c93 100644
--- a/packages/tinybird/pipes/v1_events.pipe
+++ b/packages/tinybird/pipes/v1_events.pipe
@@ -24,7 +24,7 @@ SQL >
}}
{% if defined(linkId) %} AND link_id = {{ String(linkId) }} {% end %}
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_os.pipe b/packages/tinybird/pipes/v1_os.pipe
index 0e0d3a7e47..519a8141d9 100644
--- a/packages/tinybird/pipes/v1_os.pipe
+++ b/packages/tinybird/pipes/v1_os.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_referer_urls.pipe b/packages/tinybird/pipes/v1_referer_urls.pipe
index 4b49c1b492..e664ad4246 100644
--- a/packages/tinybird/pipes/v1_referer_urls.pipe
+++ b/packages/tinybird/pipes/v1_referer_urls.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_referers.pipe b/packages/tinybird/pipes/v1_referers.pipe
index 7d95c22506..b41852c527 100644
--- a/packages/tinybird/pipes/v1_referers.pipe
+++ b/packages/tinybird/pipes/v1_referers.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_timeseries.pipe b/packages/tinybird/pipes/v1_timeseries.pipe
index 8770f1ff4d..cb314349a6 100644
--- a/packages/tinybird/pipes/v1_timeseries.pipe
+++ b/packages/tinybird/pipes/v1_timeseries.pipe
@@ -95,7 +95,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_top_links.pipe b/packages/tinybird/pipes/v1_top_links.pipe
index e069b4fae0..41f76c754a 100644
--- a/packages/tinybird/pipes/v1_top_links.pipe
+++ b/packages/tinybird/pipes/v1_top_links.pipe
@@ -22,7 +22,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}
diff --git a/packages/tinybird/pipes/v1_triggers.pipe b/packages/tinybird/pipes/v1_triggers.pipe
index 0fdad1cabb..1e151918fc 100644
--- a/packages/tinybird/pipes/v1_triggers.pipe
+++ b/packages/tinybird/pipes/v1_triggers.pipe
@@ -20,7 +20,7 @@ SQL >
}}
AND deleted == 0
{% if defined(domain) %} AND domain IN {{ Array(domain, 'String') }} {% end %}
- {% if defined(tagId) %} AND has(tag_ids, {{ tagId }}) {% end %}
+ {% if defined(tagIds) %} AND arrayIntersect(tag_ids, {{ Array(tagIds, 'String') }}) != [] {% end %}
{% if defined(root) %}
{% if Boolean(root) == 1 %} AND key = '_root' {% else %} AND key != '_root' {% end %}
{% end %}