Question

Read FTP file into attribute and create list


Badge +6

I have a predicament where I need to read a .txt file containing a list of reference numbers (example attached) .

The file is dropped by a supplier onto our SFTP.

The file usually contains customer information and therefore I don't want to store that file in a different format (e.g. csv) and read from it.

I figured that I could just use the ListBuilder to create a List from the Attribute that the file contents is stored in. However, this does not appear to work - I'm still getting a single attribute value containing the contents in the inspector.

Can anybody think of anything or am I just going to have to temporarily store, re-read and then delete the file?


2 replies

Badge +10

If you're reading the entire text file into a single attribute you want to use an attributesplitter to split on the linebreak to create your list

Badge

Hi. You are fine to read the txt file with the CSV reader and reference the location at the FTP. Authentification must of course be included in the reader

  • Source CSV: ftp://________/yourtextfile.txt
  • field names Line: 1
  • data start line: 2

Reply