Export Segment membership to SFTP | Community
Skip to main content
September 16, 2025
Solved

Export Segment membership to SFTP

  • September 16, 2025
  • 3 replies
  • 648 views

Hi Community,

I want to export segment name to SFTP. I find segment name in union schema 

as  "xdm:timeSeriesEvents.segmentList.segmentName".. When I export I get null. Please suggest how can i get multiple segment name for same profile.
 
Thanks in advance
Regards
 
 
 
Best answer by AmarapuramMahesh

Hi,
As I understand, you can create a CTAS (Create Table As Select) statement by referencing the profile snapshot table and applying the required conditions. Please update the identity value as needed for your specific use case. This approach will provide all segment IDs associated with each profile. If you also need the segment names, you can join this table with the segment definition snapshot table.
The following query extracts the email address and associated segment IDs from the profile snapshot table:
select email, key from(

SELECT workEmail.address as email ,EXPLODE(segmentMembership.ups)
FROM profile_snapshot_export_* ))

3 replies

AnkitJasani29
September 17, 2025

Hi @santoshra5 ,

You can export ids and map to names outside AEP or via Query Service you can ingest segment definition metadata into a dataset and export it to SFTP.

Thanks,

Ankit

 

September 17, 2025

Hi Ankit,

Thanks for reply.

I am exporting other profile attributes as well with segment defemination, and want it iin attribute mapping. Cant I get this while mapping.

Approach you suggesting is to create a temp table, extract segment name from "profilesnapshot" table, ingest into temp.and refresh it. please confirm.. 

 

Thanks in advance.

Regards,

Santosh

AnkitJasani29
September 17, 2025

Hi @santoshra5 ,
As far as I know, you cannot fetch segmentName directly through attribute mapping. To achieve this, you need to enrich the data (Example: using Query Service) by joining segmentMembership IDs with the segment definition metadata, and then export the enriched dataset.

Thanks,

Ankit

AmarapuramMahesh
AmarapuramMaheshAccepted solution
September 22, 2025

Hi,
As I understand, you can create a CTAS (Create Table As Select) statement by referencing the profile snapshot table and applying the required conditions. Please update the identity value as needed for your specific use case. This approach will provide all segment IDs associated with each profile. If you also need the segment names, you can join this table with the segment definition snapshot table.
The following query extracts the email address and associated segment IDs from the profile snapshot table:
select email, key from(

SELECT workEmail.address as email ,EXPLODE(segmentMembership.ups)
FROM profile_snapshot_export_* ))

October 14, 2025

Hi @amarapurammahesh @community 

I am exporting segment membership data like segment id and segment status. 

below query work for segment id.

 

SELECT workEmail.address as email ,EXPLODE(segmentMembership.ups)
FROM profile_snapshot_export_* ))

 

Can I fetch both segment id and segment status like "realized", "exited" and "existing" from profile snapshot ?

As segmember ship is a map, it's structure is below witj segment id and status.

 

"[1fa554b4-927c-4f99-8fe3-475e21aa4 ->
""(NULL,realized,2025-07-17 00:13:27.0)"",
47e09883-5044-4095-8240-04c83652e ->
""(NULL,exited,2025-08-05 01:05:32.0)"",
052a30a0-5963-4f78-b1c3-ca51318b1 ->
""(NULL,existing,2025-07-17 00:13:27.0)]"
 
 
brekrut
Adobe Employee
Adobe Employee
October 14, 2025

When exporting segment membership to a batch destination you will need to enter the following text:

 

  • segmentMembership.seg_namespace.seg_id.status
  • segmentMembership.seg_namespace.seg_id.lastQualificationTime

Please refer to the following article

https://experienceleague.adobe.com/en/docs/experience-platform/destinations/ui/activate/activate-batch-profile-destinations#known-limitations

October 14, 2025

Hi Brekrut,

Thanks for the response.

I have already tired this and always got blank values. I am creating a scheduled query to fetch segementid , segmentName and segment status from profilesnapshot and segmentsnapshot and storing it in profile and upsert enabled dataset.

I am struggling to fetch segment status only which is inside a "segmentMembership.ups" map object. Could you please suggest how to get segment status. ?

Regards,

Santosh.