0

On Marketing Cloud Data Extensions in Email -> Subscribers -> Data Extensions have type. Is there possibility to create Data Extension by API with other type than Standard (Filtered, Random)? In Data Extension SOAP documentation I don't see a 'type' property. Thanks for help.

2 Answers 2

1

You can create filters (FilterDefinition) and filter activities (FilterActivity) via SOAP API, which is what 'Filtered Data Extensions' are.

Basically you would need to:

  1. Create your Target DE (the one that will hold the resulting data)
  2. Create a FilterDefinition that contains your filter logic
  3. Create a FilterActivity that combines your FilterDefinition with your Target DE
  4. Run the FilterActivity to populate your Target DE with the filtered Data.

It is just a multi step process compared to the UI Wizard that does the calls for you, but it is still possible.

To get 'Random' you would need to use SQL to gather a random data set from a source DE.

Like so:

  1. Create your Target DE (the one that will hold the resulting data)
  2. Create a SQL query (QueryDefinition) to grab the random dataset you desire
  3. Perform the QueryDefinition to fill in your data into the Target DE

Here is a good source for 'random selection' queries.

1
  • Thank you for the answer. I tried your way to create filtered DE and it's working but there is one problem. In subscribers -> Data Extensions in table, type is still 'Standard' and i can filter it but which is impossible with 'Filtered' DE. Can i somehow change this type when creating by API? Commented May 28, 2019 at 8:14
0

To the best of my knowledge, it is not possible to create non-standard data extensions through the API. That being said, you could run activities through the API in order to mimic the behavior of those data extensions by doing something like:

1) Create standard data extension with appropriate columns using the API.

2) Create/update SQL query with the API to include your filtering conditions (or random selection from a parent DE if you need a random DE)

3) Execute Query via the API.

If you have less than 2,500 rows then you could just initialize the parent DE and run a filter part on it to return your filtered/random data set with SSJS rather than having to create/run a query. While it is possible to execute on more rows than that by keeping the request open, it's slow and probably best suited for SQL in that instance.

You must log in to answer this question.

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