Skip to main content

Dear Community, 

 

I have one technical question: One of my Marketing cloud client want to dynamically extract DE in a Particular folder to SFTP as a csv or json file. Folder path:  

Data Extensions >Interactive Content. 

 

I have tried Pivoting the DE using SQL activity but for Future DEs I need to keep adding the SQl Activity. So client wants to Dynamically extracts DEs from the Folder to SFTP. 

 

Do you have any suggestions to achieve this or any use case from past experience will help me a lot. 

 

Thank you, 

Guru 

 

#Trailhead Challenges  #Trailhead  #SFMC  #Marketing Cloud  #Marketing Cloud Engagement  #AgentforceMarketing

4 Antworten
  1. Heute 08:08

    Great progress, Gurulingamurthy! For the actual data export the native path is a two-step chain, not something SSJS does directly: 

     

    1. Data Extract activity: exports a Data Extension to a file in the Safehouse (Marketing Cloud's staging area). 

    2. File Transfer activity (Move File from Safehouse): pushes that file from the Safehouse to your Enhanced FTP or external SFTP. 

     

    That is the supported way to get DE data out as CSV. The catch: a Data Extract targets ONE specific Data Extension, so it is not natively dynamic across a whole folder. 

     

    So for the dynamic part, two options: 

    - If the set of DEs in the folder is fairly fixed, add one Data Extract plus File Transfer per DE in the automation (you already have the customer keys). 

    - If it is truly dynamic, drive it from an external job: for each customer key your SSJS returned, page the rows with the REST endpoint /data/v1/customobjectdata/key/{key}/rowset, build the CSV or JSON, and SFTP it. That offloads the row processing SSJS Script Activities cannot do at scale, they have tight CPU and time limits and no clean native SFTP write. 

     

    So: SSJS to enumerate the DE keys in the folder (done), then Data Extract plus File Transfer per DE for the export, or the external REST route for full dynamism. 

     

    if this helps, please mark it as the Best Answer so it helps the next person, thanks 🙂

0/9000