Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Count of profiles by audience through Query.

Avatar

Level 2

Hello everyone,

How to find the profiles in audience using Queries in AEP, and Where to find profile-snapshot, source_namespace in AEP anyone pls help me out!!

 

Reference Doc:

https://experienceleague.adobe.com/docs/experience-platform/dashboards/query.html?lang=en#count-of-p...

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

arpangarg_0-1706274376813.png

 

Thanks,

Arpan

 

View solution in original post

9 Replies

Avatar

Community Advisor

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.

 

arpangarg_0-1706111918879.png

 

 

Thanks!

 
 
 

Avatar

Level 2

Thanks!, @arpan-garg 

Could you please tell me source_namespace and audiencemembership in AEP.

Avatar

Community Advisor

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.

Avatar

Level 2

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


Avatar

Community Advisor

Actually source_namespace is an alias and segmentMembership is the column name so you dont have to update those in query. Just specify the correct profile export dataset table name and run the query.

Avatar

Correct answer by
Community Advisor

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

arpangarg_0-1706274376813.png

 

Thanks,

Arpan

 

That's great. Is it possible to get extra details about the audience apart from its ID? I need to write a query where for every audience I list: the name, the description and the profile count. 

Avatar

Community Advisor

Hi @krystynasylwiaszurmanska  - Yes its possible , for this you need to join the result of this query with Segmentdefinition-Snapshot-Export to get more about details about the segments. Segment name i am sure is possible . Need to check on segment description. Can you raise this as a separate question on the community for better reach.

 

Thanks,

Arpan