Skip to main content
Solved

How to use FTPCaller to download a CSV at the beginning of a process.

  • March 2, 2023
  • 3 replies
  • 101 views

Forum|alt.badge.img

Hello, new FME user here. I am modifying an existing script to download a CSV from an FTP site. I want this to trigger at the beginning of the process as shown in the diagram below. I want the newly downloaded CSV to feed into the CSV reader. How can I trigger the FTPCaller at the beginning of the script and how can I feed the new CSV file into the CSV reader? Any assistance would be appreciated. Thank you!

 

image

Best answer by daveatsafe

Is there a way to do it without having to create a temp folder? I'd really like the file to a permanent location.

To use a permanent location, please remove the TempPathNameCreator, then use the permanent location instead for the Target File in the FTPCaller and the Dataset in the FeatureReader.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • March 2, 2023

Hi @jkin​,

You can use the following process to download the CSV file to a temp folder, then read it with the FeatureReader transformer:

Screen Shot 2023-03-02 at 11.58.48 AMScreen Shot 2023-03-02 at 11.59.03 AMScreen Shot 2023-03-02 at 11.59.22 AMThe folder created by the TempPathnameCreator is deleted when the workspace finishes, cleaning up the downloaded CSV file automatically.

 


Forum|alt.badge.img
  • Author
  • 1 reply
  • March 6, 2023

Hi @jkin​,

You can use the following process to download the CSV file to a temp folder, then read it with the FeatureReader transformer:

Screen Shot 2023-03-02 at 11.58.48 AMScreen Shot 2023-03-02 at 11.59.03 AMScreen Shot 2023-03-02 at 11.59.22 AMThe folder created by the TempPathnameCreator is deleted when the workspace finishes, cleaning up the downloaded CSV file automatically.

 

Is there a way to do it without having to create a temp folder? I'd really like the file to a permanent location.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • Best Answer
  • March 6, 2023

Is there a way to do it without having to create a temp folder? I'd really like the file to a permanent location.

To use a permanent location, please remove the TempPathNameCreator, then use the permanent location instead for the Target File in the FTPCaller and the Dataset in the FeatureReader.