diff --git a/sql/moz-fx-data-shared-prod/stripe_external/customer_discount_v1/query.sql b/sql/moz-fx-data-shared-prod/stripe_external/customer_discount_v1/query.sql index 41d26056e02..fb1c05e89c4 100644 --- a/sql/moz-fx-data-shared-prod/stripe_external/customer_discount_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/stripe_external/customer_discount_v1/query.sql @@ -12,3 +12,6 @@ SELECT subscription_id, FROM `moz-fx-data-bq-fivetran`.stripe.customer_discount +WHERE + -- Fivetran used to have a bug where it synced subscription discounts as customer discounts. + subscription_id IS NULL diff --git a/sql/moz-fx-data-shared-prod/stripe_external/discount_v1/query.sql b/sql/moz-fx-data-shared-prod/stripe_external/discount_v1/query.sql index f89b784f5a5..cd04d289295 100644 --- a/sql/moz-fx-data-shared-prod/stripe_external/discount_v1/query.sql +++ b/sql/moz-fx-data-shared-prod/stripe_external/discount_v1/query.sql @@ -17,3 +17,6 @@ SELECT subscription_id, FROM `moz-fx-data-bq-fivetran.stripe.discount` +WHERE + -- Fivetran used to have a bug where it synced subscription discounts as customer discounts. + NOT (type = 'CUSTOMER' AND subscription_id IS NOT NULL)