How to load one file at a time from FTP activity in adobe campaign

Avatar

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
adithyacs86
Level 3

24-01-2019

Hi Team,

I have a query suppose we have a multiple files in a server and all the naming conventions are similar like :-

A_1.csv

A_2.csv

A_3.csv

Now i have to load all the file for today's load but i have other certain data loading and enriching activities is taking lot of time and sometimes timing out.

So wanted to check if we can load one file at a time from the FTP activity.

I mean to say take one file (like Head -1) or the top in the server and once picked up then delete the file from the server, later it will be ready for the next file to be picked.

Can we do this in FTP activity, or any other alternates we can use to have this task accomplished.

Thanks,
Adithya

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

24-01-2019

Hi Adithya,

At the time being, the ACC workflow activity Transfer File (using FTP/SFTP) can manage to stop after having transferred 1 file, through the Planning tab, with the checkbox Execution planned , then select the checkbox Stop planification as soon as 1 file has been transferred.

But you don't have control on what file is taken, based for example on a pattern on file basename, or size or whatever.

Moreover the planification being activated, it is not a precise control on what/when it is done, even if you set it to every hour or every 10 mn.

Alternative is to write specific code with Javascript activity and by using JSPAPI, see method download of ftp class:

http://docs.campaign.adobe.com/doc/AC/en/jsapi/m-FTP-download.html

The idea is to use the method list (belonging also to ftp class) and so get list of files in a folder, then select a file and loop for transfer it, and do what you need in the loop, such as sleep or whatever.

Regards
J-Serge

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

30-01-2019

Hi Adithya,


If you select the checkbox mentioned, it should take only 1 file, but you have no control on which file, there is no place for regular expression (as there is in the file collector activity).


It is why I mentioned doing it by Javascript coding if you need a precise control based on file name.

Otherwise the easier way is to use the checkbox in the Transfer file activity Planification tab.

Regards.
J-Serge

Avatar

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
adithyacs86
Level 3

30-01-2019

Hi Jean,

I happen to test this, FTP activity is taking all the files at the same time even though i enabled the planned execution.

I wanted to have only one file (based on patterns) to be picked up.

Please let me know if you have any further updates on this.

Thanks in advance.

Adithya

Avatar

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

110 posts

Correct reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
adithyacs86
Level 3

29-01-2019

Hi Jean ,

Thanks for the reply.. I will test the option mentioned, I will let you know for any updates on the same.

Regards,
Adithya