Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

How to Query Audience Membership

Avatar

Level 5

Hey there! 

As we all know the profile snapshot dataset is an incredibly powerful tool! I would like to be able to do the 'inverse' and I was curious if anyone has figured out a method for this within AEP already.

I would like to be able to query a given Audience ID, and get a result of all customers that are qualified for that audience. It could be a 'realized' state or it any other method, but basically giving me a return of all profiles that fall within the given criteria. I already do this via API for one off checks, and have audiences that I have activated to various platforms, but I would love to be able to do it right within AEP.

Does anyone have a solve for this use case?

Thanks so much!

Tyler Krause

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi, Tyler. You can use this query to return a set of identities that qualify.

 

select identity from
(select identity, explode(value) from
(select identity, explode(segmentmembership) from profile_snapshot_export_.....))
where key = 'audience-id' and value.status = 'realized')

View solution in original post

3 Replies

Avatar

Level 7

Hi @TylerKrause ,

According to below reference link, we can export audiences as data files to cloud storage locations which contains audiences and their profile attributes.

https://experienceleague.adobe.com/en/docs/experience-platform/destinations/catalog/cloud-storage/ov...

 

Thanks

Ankit

Avatar

Correct answer by
Level 3

Hi, Tyler. You can use this query to return a set of identities that qualify.

 

select identity from
(select identity, explode(value) from
(select identity, explode(segmentmembership) from profile_snapshot_export_.....))
where key = 'audience-id' and value.status = 'realized')

Avatar

Community Advisor

Select IdentityXX

 from

 profile_snapshot_export_XXXXXXX

  where

 segmentMembership['ups']['Segmentid'] IS NOT NULL

AND segmentMembership['ups']['segmentid']['status'] IN ('realized') OR

segmentMembership['ups']['segmentid']['status'] IN ('Existing')