Query all members of a audience | Community
Skip to main content
Level 2
May 19, 2025
Solved

Query all members of a audience

  • May 19, 2025
  • 2 replies
  • 444 views

Hello there, 

Any way to query all the members from one particular audience?
I know just to check if a members is part of one particular audience and, furthermore the sample data is not enough

 

thanks for the help!

Best answer by SatheeskannaK

@diegomo5 Use this query and modify it based on your needs.

 

select to_json(identityMap['email']['id']), to_json(segmentMembership['ups']['<<segment_id>>'])
from profile_snapshot_export_<<snapshot_id>>
where segmentMembership['ups']['<<segment_id>>']['status'] in ('existing', 'realized', 'exited')

2 replies

SatheeskannaK
Community Advisor
SatheeskannaKCommunity AdvisorAccepted solution
Community Advisor
May 19, 2025

@diegomo5 Use this query and modify it based on your needs.

 

select to_json(identityMap['email']['id']), to_json(segmentMembership['ups']['<<segment_id>>'])
from profile_snapshot_export_<<snapshot_id>>
where segmentMembership['ups']['<<segment_id>>']['status'] in ('existing', 'realized', 'exited')

Thanks, Sathees
DiegoMo5Author
Level 2
May 20, 2025

Thank you very much @satheeskannak

It is working as expected, the existence of the table "profile_snapshot_export" was the piece of cake

query = "SHOW TABLES LIKE 'profile_snapshot_export_%';"
 
AnkitJasani29
Level 6
May 20, 2025

Hi @diegomo5 ,

Agree with @satheeskannak 's response. For more information, you can visit https://experienceleague.adobe.com/en/docs/experience-platform/query/home