zuora_assert_no_self_reference.sql 287 Bytes
Newer Older
emilie's avatar
emilie committed
1 2 3 4
-- Asserts that a subscription is not linked to itself as a renewal subscription

SELECT
    *
5 6 7
FROM {{ ref('zuora_subscription_xf') }},
    LATERAL flatten(input => zuora_renewal_subscription_name_slugify, OUTER => TRUE) renewal
WHERE renewal.value :: STRING = subscription_name_slugify