Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleSTEP 2: Set up the component configurations
image-20240814-201930.pngImage Added

Fields marked with an asterisk * are required

image-20240814-201930.pngImage Removed

.

Connection Configurations:

Field

Description

Default Value

Protocol *

: specify

Specifies the protocol you’ll be using

(

. Supports: FTP, FTPS, or SFTP

)

FTP

Server *

: the server you’ll

The server you will be connecting with

-

Port *

: the

The port to use

-

Username *

: the

The remote user to login as.

This account will need permissions to read, delete, and/or move files to the specified FTPDirectory

-

Password

The password to authenticate with.

-

Certificate

: the

The name of your certificate file, if in use.

By default, this should be a PEM certificate. The default configurations can be changed by modifying the net.[protocol].init function directly in the script. See Adapting the Component.

This configuration is only applicable for FTP and FTPS.

-

PrivateKey

: the

The name of your private key file, if in use.

By default, this should be a PEM certificate and not be password-locked. The default configurations can be changed by modifying the net.[protocol].init function directly in the script. See Adapting the Component.

Password: the password to authenticate with

-

RetryCount

: the

The number of times to retry the connection if it drops.

By default, it will retry 3 times.

Default is set to 3 attempts.

3

FTP Workflow Configurations:

Field

Description

Default Value

FTPDirectory *

: the

The source directory on the FTP server you’ll be retrieving files from

FTP

FileType

: the

The types of files you wish to retrieve (e.g. txt). You can also specify multiple files (e.g. txt,hl7) or all file types (e.g. *).

-

MoveFTPProcessedFiles

: set

Set to true if you wish to move processed files (i.e. files that have already been downloaded to the local server) to a folder on the FTP server designated by FTPProcessedDirectory. If false, processed files will be deleted.

This is set to true by default.

true

FTPProcessedDirectory

: the

The directory on the FTP server that processed files will be moved into. You will need to create this folder if you choose to use this workflow.

-

Local File Workflow Configurations:

Field

Description

Default Value

LocalDirectory *

: the

The local directory that the files will be downloaded to from the FTP server. Files in this directory will then be picked up for processing.

-

MoveProcessedFiles

: set

Set to true if you wish to move processed files to a local folder designated by ProcessedDirectory. If false, processed files will be deleted.

This is set to true by default.

true

ProcessedDirectory

: the

The local directory that processed files will be moved into. You will need to create this folder if you choose to use this workflow.

-

MinimumFileAge *

: the

The time to wait in seconds after last modified date before processing.

By default, this is 0 seconds.

0

IgnoreSegments *

: set to true

Specifies whether to remove

specified

identified segments when processing file

. By default, this is false

.

Default segments to ignore include: FHS, BHS, FTS, BTS. This can be modified in config.lua. See Adapting the Component.

false

InputFileEncoding *

: encoding of input files.

The encoding used in the output file.

If left blank,

it

encoding will be updated to the default

encoding

according to OS. See supported encodings below.

Default:

Western (Windows-1252) for Windows

machines, and

Western (ISO-8859-1) for Linux/Mac OS

X machines

.

Expand
titleSTEP 3: Start the component and view the processed files' contents in the logs

Once the component has been started, it will download files that match the provided parameters to the specified local directory. It will then process the downloaded files and push their contents to the component’s queue for further processing. Open the component’s logs to see the queued files and verify that the contents are being read as expected.

...

Expand
titleCustomize the FTP/FTPS/SFTP connection

By default, the FTP/FTPS/SFTP connection is authenticated using username and password authentication and uses the default configurations. In some cases, additional configurations may be desired, such as:

  • Specifying a FTP(S) mode

  • Using public and private key authentication

  • Disabling verify_peer or verify_host

  • Increasing the timeout

  • and more. Full details can be found by accessing the net.ftp.init, net.ftps.init, or net.sftp.init function help in the Translator

These configurations can be customized by modifying the Input parameter table in the loadConfigs() function in FTP/FTPprocess.lua:

image-20240814-203707.png
Expand
titleAdd more file retrieval conditions

Currently, the component retrieves files from the FTP server based on two conditions:

  1. The file is retrievable

  2. The file extension matches the provided extension (e.g. txt)

This is typically sufficient for most cases, but if additional conditions are needed, they can be added to the FTPmatchRules function in FTP/FTPmatchRules.lua:

image-20240814-203816.png

...