1

I don't have any control over the generation of a file I need to import into a data extension. Is it possible to choose a 2 digit year for an import's File Naming Pattern?

Example: INV-%%Month%%%%Day%%%%2DigitYear%%-%%Hour%%%%Minute%%%%Second%%.csv

INV-110617-113000.csv

I'd prefer not setting a recurring calendar notice for Jan 1st every year.

  • Have you tried “YY”? – Samuel Dare Jun 6 '18 at 19:28
  • @Data_Kid, yes, I did try that, but it doesn't work. – Daniel D. Jun 6 '18 at 20:59
3

It doesn't look like this is possible inside of Import activity. All that are listed as possible to add are:

%%Year%%

%%Month%%

%%Day%%

%%Hour%%

%%Minute%%

%%Second%%

You might want to look at putting this import activity into a Triggered Automation and in the file name for the import activity, enter %%FILENAME_FROM_TRIGGER%%. The Triggered Automation settings are more forgivable (can use CONTAIN,BEGIN WITH, etc.) and should be able to meet your needs.

  • 1
    I don't think %%FILENAME_FROM_TRIGGER%% works anymore. – Daniel D. Jun 6 '18 at 20:01
  • 1
    I have it functioning in multiple import activities right now. It is just no longer documented. I do believe they are looking to remove it eventually (due to a change on the way their data storage model will work), but for now it does still work. – Gortonington Jun 6 '18 at 20:28
  • Let me clarify, I don't think it is working like it used to. Before, if the filename trigger was set up as 'begins with' (like this example INV-060618-140030.csv) triggers the automation, it would use the exact file name of INV-060618-140030.csv to process. Now, I believe it uses the 'begins with' logic, and finds inventory files from previous triggers (for example it would find an earlier file with the file name of INV-051618-043034.csv). So my issue is that it's processing earliest file in the enhanced FTP, not the exact file that actually triggered the automation to start. – Daniel D. Jun 6 '18 at 21:03
  • I'll be honest, I have never run into that issue. It should be based off the file that literally triggered the automation. So as long as you have your logic correct in the automation trigger, it should function. I will try to look into this and report back if I find anything on this. – Gortonington Jun 6 '18 at 21:27
  • 1
    Oh boy, disregard my comment, you were right @Gortonington. There was an issue with the ordinals, the 3rd party that preps these files changed columns on me, and I had a while back turned off getting the import success email because these files came it way too frequently. I just turned it back on, noticed the issue, and fixed it, and now the %%FILENAME_FROM_TRIGGER%% works as it always did. Thanks for the help! – Daniel D. Jun 6 '18 at 21:45

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.