0

I have a DE that holds all of the subscribers to our email newsletter. What I need is a filter that will randomly take one subscriber from the DE and move it to a different DE. Most importantly, I need this filter to be automated to run and update once a week.

I know that there is the option to create a 'random data extension' and that works for the first part, but I cannot seem to find a way to do the automation part.

2

You can certainly use two Query Activities to select a random subscriber from a Data Extension and then exclude that subscriber from the final audience.

Something like this should work:

Random Sample

select top 1 
s.emailAddress
from s.NewsletterSubscribers
order by newID()
/* target: NewsletterSubscribersControl */
/* action: overwrite */

Everyone else

select 
s.emailAddress
from NewsletterSubscribers s
left join NewsletterSubscribersControl c on (c.emailAddress = s.emailAddress)
where c.emailAddress is null
/* target: NewsletterSubscribersDaily */
/* action: overwrite */
  • Thanks Adam! After a few adjustments to your code for my particular case it all seems to be working now! I don't have a lot of experience working with queries, so it seemed a lot more daunting at first glance. Cheers! – TomC Jul 20 '16 at 20:38
0

In order to automate, You need to change your approach. You can write query that can populate one row from source DE to target DE. This query can then scheduled using Automation Studio

  • I think you're right, I've been going about this the wrong way. This, plus Adam's code up top seemed to have done it! Thanks a lot! – TomC Jul 20 '16 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.