0

I have a 3 step automation:

  1. Step 1 selects the audience for the journey entry data extension (this overwrites the DE Offer_Extension_Warmup_Journey_Entry)
  2. Step runs the exact same query but logs the records to a logging data extension (This adds and updates the logging DE Offer_Extension_Journey_Entry)
  3. Step 3 is the journey to send out the emails.

The query is resulting in different records in step 1 & step 2. I'm not sure what might be causing that.

SELECT TOP (1200)
email_address,
first_name,
last_name,
preapproved_amount,
promo_code,
expiry_date = DATEADD (DAY,86,expiry_date)
FROM First_Offer_Journey_Entry
    WHERE (email_address NOT IN (select email_address from Offer_Extension_Journey_Entry))
    AND (email_address NOT IN (select email_address from [Email Addresses from Table A]))
    AND (email_address NOT IN (select email_address from [Email Addresses from Table B]))
    AND (email_address NOT IN (select email_address from [Not-In-Table-B]))
    AND (email_address NOT IN (select SubscriberKey from ent.[HardBounces_DE]))
    AND (email_address NOT IN (select SubscriberKey from ent.[DV_Complaint]))
    AND (email_address NOT IN (select email_address from [Withdrawn_Non-Retargetable]))
    AND (email_address NOT IN (select email_address from [DM Data To be Excluded from OE]))
    AND expiry_date = '7/20/2023 12:00:00 AM'
    AND email_address like '%@gmail.com'

1 Answer 1

0

Is the Journey entry DE receiving records as the queries are running?

If so, you could simply run your second query using the target DE of the first query as the from in your second query.

Query 1

SELECT TOP (1200)
  e.email_address
, e.first_name
, e.last_name
, e.preapproved_amount
, e.promo_code
, expiry_date = DATEADD(DAY, 86, e.expiry_date)
FROM First_Offer_Journey_Entry as e
WHERE 1=1
and e.email_address not in (
    
              select email_address from Offer_Extension_Journey_Entry
    union all select email_address from [Email Addresses from Table A]
    union all select email_address from [Email Addresses from Table B]
    union all select email_address from [Not-In-Table-B]
    union all select SubscriberKey as email_address from ent.[HardBounces_DE]
    union all select SubscriberKey as email_address from ent.[DV_Complaint]
    union all select email_address from [Withdrawn_Non-Retargetable]
    union all select email_address from [DM Data To be Excluded from OE]
)
AND e.expiry_date = '7/20/2023 12:00:00 AM'
AND e.email_address like '%@gmail.com'
/* target: Offer_Extension_Warmup_Journey_Entry */
/* action: overwrite */

Query 2

SELECT
  e.email_address
, e.first_name
, e.last_name
, e.preapproved_amount
, e.promo_code
, e.expiry_date
FROM Offer_Extension_Warmup_Journey_Entry as e
/* action: update */
/* target: Offer_Extension_Journey_Entry */

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .