Count of profiles by audience through Query. | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arpan-garg

I know it is silly doubt, but 
Where will I get source_namespace and segmentMembership



Hi @arun_97  - You don't need to get source_namespace and segmentMembership. Just enter the query on the query canvas by replacing the correct dataset name and then you can see the results.

 

Adding a screenshot for your reference. Notice the query, i didn't change source_namespace and segmentMembership

 

Thanks,

Arpan

 

1 reply

arpan-garg
Community Advisor
Community Advisor
January 24, 2024

Hello, @arun_97 ,

A profile snapshot is system generated dataset which is generated daily in AEP, providing information about the unified profile. To access it, navigate to the list of datasets in AEP, where you'll find the profile snapshot. I've attached a screenshot for your reference.

 

 

 

Thanks!

 
 
 
arun_97Author
Level 2
January 25, 2024

Thanks!, @arpan-garg 

Could you please tell me source_namespace and audiencemembership in AEP.

arpan-garg
Community Advisor
Community Advisor
January 25, 2024

Hello@arun_97 ,

 

The document contains some errors because audience membership is no longer relevant. Instead, you should use segment membership. The key column, as explained in the query, is source_namespace, present in the table.

The corrected query is as follows:


SELECT
CONCAT_WS('-', key, source_namespace) AS audience_id,
COUNT(1) AS count_of_profiles
FROM
(
SELECT
UPPER(key) AS source_namespace,
EXPLODE(value)
FROM
(
SELECT
EXPLODE(segmentMembership)
FROM
<correct_dataset_name>
)
)
GROUP BY
audience_id;

Please replace `<correct_dataset_name>` with the actual name of the dataset.