Expand my Community achievements bar.

SOLVED

Datastream: how to select different event datasets programmatically from Mobile SDK

Avatar

Level 2

Hi,

we are tracking events in our mobile app via the sendEvent function of the Mobile SDK (https://developer.adobe.com/client-sdks/home/getting-started/track-events/).

The function automatically writes the data on the primary event dataset configured in the datastream.
I'd like to understand, given a datastream with 2 events datasets configured as in the picture below, whether it is possible to switch/change the target destination datasets programmatically from the Adobe Mobile SDK.
The use case is if we need to track some events in a datasets, and some other events in another dataset. Thus we cannot always switch primary dataset, because both would be used at the same time, according to the event being tracked.

 

alben_1-1699264747347.png

 

Many thanks,

Alberto

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 5

Yes you can overwrite the dataset with all the ways of sending data to edge,

Particular for native apps use below method

https://experienceleague.adobe.com/docs/experience-platform/datastreams/overrides.html?lang=en#send-...

View solution in original post

5 Replies

Avatar

Community Advisor

@alben I doubt that's possible, however there is another option you could consider which might be much better to maintain and make changes without any developer involvement in the future. Here's how i would do it 

 

  1. Create a event dataset, call it master event and send all required events for both the use cases and name the attributes with good conventions. Do not enable this for profile 
  2. Use query service to pick and choose attributes and format as required and write it to two separate datasets which can then be enabled for profile. 
  3. Update query as new requirements arise from business 

Hope that helps 

Anil

Avatar

Level 2

Hi Anil,
thanks for answering.

I understand you advice. I have a couple of questions, just for curiosity:

1) From a technical standpoint, your solution would work also enabling the master event dataset for profile, right? I mean, it might be useless, but I want to understand whether I am missing some limitations.

2) Which is the point of allowing multiple event datasets to be added to a datastream, if just the primary one can be used, and only a primary dataset is allowed? It seems like the only dataset which is primary is the enabled one, while all the other non-primary are disabled.

Avatar

Community Advisor

@alben Yes you sure can enable it to profile, this will end up giving you all the events written to profile. 

I think it eventually boils down to the purpose of why you were setting up two different dataset and choose specific events to be sent there, it is usually to filter attributes i.e keep noise out and enable it for profile. 

Avatar

Correct answer by
Level 5

Yes you can overwrite the dataset with all the ways of sending data to edge,

Particular for native apps use below method

https://experienceleague.adobe.com/docs/experience-platform/datastreams/overrides.html?lang=en#send-...