0

In the Data Extract activity, we can use the File Name Pattern to define the exported file name, but we can only use the following personalization strings in the filename: %%Year%% %%Month%% %%Day%% %%Hour%%. for example: FileNmae_%%Year%%%%Month%%%%Day%%.csv

I have a business senario: I want to generate a file containing the data of the month before last month, for example: today is July 22nd, 2022, I want to generated the file of May, the file name should be FileNmae_202205.csv, but it looks like the file name pattern is not able to do like that.

Is there any other way to achive that?

1
  • Is there a solution to this issue? I am facing the same issue. Commented Jun 8 at 11:56

1 Answer 1

0

I believe those file naming attributes are not retroactive unfortunately. Which doesn’t make what you’re trying to achieve possible through Automation Studio.

Why not solution the DE extract differently by adding a field to the DE that indicates the year and month of the export cohort via sql? If file naming of the export is essential for the business logic, then write a bash script to get the first row of non-header extract data of the solution above, then rename that file accordingly.

Or manually create a filtered DE for that date range and then export the csv. Depending on how often this data needs to be pulled, I would go with the this solution if it’s not daily or weekly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .