0

I have an Automation containing a Data Extract and File Transfer that exports the contents of a Data Extension each day.

Is there a way to only export data from the previous day, rather than exporting all of the data in the Data Extension each day?

  • I believe you do have a field with a timestamp in that Data Extension? – Lukas Lunow Mar 17 at 14:45
  • Yes, it's writing as date/time though, which is causing its own problems – Thomas Hockey Mar 17 at 14:53
1

You have a source DataExtension i assume (if not it seems weird).

Create a second DataExtension - "Daily Export of XXX".

Create an SQL that dynamically gets the data from the last day from the Source Dataextension and fill the data in the second DataExtension. Will have a condition that looks like (assuming you have a eventDate field that contains the date):

WHERE EventDate >=DATEADD(MINUTE,0,DATEDIFF(D,0,GETDATE()-1))
AND EventDate < DATEADD(MINUTE,0,DATEDIFF(D,0,GETDATE()))

Do a DataExtract to the Safehouse.

Do a DataExtract to convert it to Utf8.

Create a file transfer to the sftp location.

Synchronize your sftp of salesforce or your internal one with salesforce.

Voilla.

| improve this answer | |
  • Thank you. I don't suppose there is a way of doing this without SQL is there? – Thomas Hockey Mar 17 at 14:40
  • Uhm, i am not sure. That would be the way that i would use because it is stable, flexible and i know sql to achieve it. – Johannes Schapdick Mar 17 at 14:45
  • SQL is indeed needed, @ThomasHockey. This is the only way to isolate the records you want to extract – Lukas Lunow Mar 17 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.