Skip to main content
TylerKrause
Adobe Champion and User Group Leader
Adobe Champion and User Group Leader
Jun 3, 2025 2:23 PM UTC
Solved

How to Query Audience Membership

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kendallhallAccepted solution
Level 3
Jun 9, 2025 7:28 PM UTC

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')

3 replies

AnkitJasani29
Adobe Champion
Adobe Champion
Jun 4, 2025 4:25 AM UTC

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/overview

 

Thanks

Ankit

Translate
kendallhallAccepted solution
Level 3
Jun 9, 2025 7:28 PM UTC

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')

Translate
Indra-2
Community Advisor
Community Advisor
Jun 28, 2025 12:17 AM UTC

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')

Translate