0

Currently I have a subscription form that is sending all new subscriptions to one data extension. One of the options they select on the subscription form is "Customer Type." I have four different customer types that need to be filtered into four corresponding data extensions.

I created four data filter activities (ex: If Customer type is equal to "Customer Type 1").

I know that I need to use Automation studio for this and a SQL script. I'm looking for some resources on how I build this workflow in Automation studio to ensure all entries are taken out of the first data extension and put in the data extension with the corresponding customer type.

1
  • Why do you need the SQL query? Your filter activities should handle all of this. Commented Aug 17, 2017 at 18:37

2 Answers 2

2

Judging from your comments on @MarkusSlabina answer, it sounds like you will need to use SQL as you already have existing DE for the filtered data that you need to use - making it extremely difficult to use filter activities.

You would need to create a query for each different version, you should be able to use the below for each, just change out the 'whatever' with the appropriate customer type and make sure the field names, primary keys and field count are identical on each target DE when compared to Master DE.

SQL:

SELECT *
FROM [Master DE]
WHERE customerType = 'whatever'

I would recommend setting it to 'Update' as Update Type in Query activity. (This is basically an 'add and update' option)

From there, you would need to build a scheduled automation and set all of these queries inside the automation. Once you schedule for the time period you need, you just let it run and it handle your filtering.

2
  • Perfect. This is what I was looking for. Thanks @Gortonington! Commented Aug 17, 2017 at 20:44
  • No problem, but for future needs, Markus answer is the best way to do it Commented Aug 17, 2017 at 21:13
1

If you configured the Data Filter activities correctly there is no need to use an SQL query activity as you select the source and destination data extensions in the wizard of the data filter. All the necessary steps including the fields where you select the source/destination can be found in the documentation article "Create a Filter Activity".

If done correctly, your Automation just needs to contain all the Filter activities.

Another way would be using SQL query activities, which isn't necessary in your case. If desired, please find the documentation below.

Related documentation:

2
  • Thats a lot easier than I thought. Thank you so much. My only followup question: the filter activity creates a new data extension for me, but what happens if I have a data extension already built out (that contains records) that I want to be the destination? Commented Aug 17, 2017 at 18:41
  • The only way to prevent it creating a new DE is by creating the interaction via API (which I would not recommend as it is fairly complex) - if you can't easily transfer the DE to the new filtered DE, then you would need SQL queries. Commented Aug 17, 2017 at 19:39

You must log in to answer this question.

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