Follow our setup guide to sync files from an FTPS server to your destination.
Prerequisiteslink
To set up the Fivetran FTPS connector, you need:
- An account on an FTPS server containing files with supported file types and encodings
- The ability to log in to this account using a password
Setup instructionslink
-
In the connector setup form, enter the Destination schema name of your choice.
-
Enter the Destination table name.
-
Enter your User name.
-
Enter your Password.
-
Enter the Host Address.
-
Enter the Port number.
-
Set the Secure FTP toggle to ON.
-
Choose your configuration options. Using these configuration options, you can select subsets of your folders, specific types of files, and more to sync only the files you need in your destination. In addition, setting up multiple connectors targeted at the same file system but with different options allows you to slice and dice a file system any way you’d like.
You can use the following configuration options:
-
(Optional) Folder Path - Use the folder path to specify the portion of the file system in which you’d like Fivetran to look for files. We examine files under the specified folder and all of its nested subfolders for files we can sync. If you don’t provide a prefix, we’ll look through the entire file system for files to sync.
-
(Optional) File Pattern - Use a regular expression as the file pattern to decide whether or not to sync specific files. The pattern applies to everything under the prefix (folder path). If you’re unsure what regular expression to use, you can leave this field blank, and we’ll sync everything under the prefix.
For example, let’s say that you have three folders -
2017
,2016
, anderrors
- under the prefixlogs
. Using the pattern \d\d\d\d/.*, you can exclude all the files in theerrors
folder because:-
\d\d\d\d
only applies to the folders whose name consists of four consecutive digits, and -
.*
after/
applies to any files in these folders
TIP: You can learn to write your regex and test it out.
-
-
File Type - Use the file type to choose the parsing strategy for files without file extensions. If you save your files with improper extensions, you can force them to be synced as the selected file type.
-
If you select infer, we infer the type from a file’s extension (.csv, .tsv, .json, .avro, or .log).
-
If you choose a file type, we interpret every file we examine as the file type you select, so make sure everything we sync has the same file type.
For example, if you have an automated CSV output system that saves files without a .csv extension, you can specify the type as csv, and we will sync them correctly as CSVs.
-
-
Compression - Use the compression option to choose the compression strategy to decompress files without compression extensions. If your files are compressed but do not have extensions indicating the compression method, you can decompress them according to the selected compression algorithm.
-
If all of your compressed files are correctly marked with a matching compression extension (.bz2, .gz, .gzip, .tar, or .zip), you can select infer.
-
If you select uncompressed, we do not decompress the files and sync the uncompressed files.
-
If you choose a compression format, we decompress every file using the format you select.
For example, if you have an automated CSV output system that GZIPs files to save space but saves them without a .gzip extension, you can set this field to GZIP. We will decompress every file that we examine using GZIP.
-
-
Error Handling - Use the error handling option to choose how to handle errors in your files. If you know that your files contain some errors, you can choose to skip poorly formatted lines.
-
If you select skip, we ignore improperly formatted data within a file, allowing you to sync only valid data.
-
If you select fail, we do not sync a file if we detect improperly formatted data in the file.
TIP: We recommend that you select fail unless you are sure that you have undesirable, malformed data.
You will receive a notification on your Fivetran dashboard if we encounter errors.
-
-
-
(Optional) To use the advanced configuration options, set the Enable Advanced Options toggle to ON.
You can use the following configuration options for specific use cases:
-
Modified File Merge - Use this option to let Fivetran know how to update files in the destination. When you modify a previously synced file, this setting tells us whether we should replace the rows in the destination table or append the new rows to the table:
-
upsert_file replaces records in destination, using the filename and line number as the primary key.
-
append_file appends records.
-
-
(Optional) Archive Folder Pattern - Use a regular expression to filter and sync files from archived folders. We sync the files in compressed archives with filenames matching the specified pattern. If there are multiple files within archive (TAR or ZIP) folders, you can use the archive folder pattern to filter file types. For example, if you specify the archive folder pattern as
.*json
, we will sync only the files that end in a .json file extension from the archive folder. -
(Optional) Null Sequence - Specify which value indicates null if your CSVs use a special value indicating null.
Only use this field if you are sure your CSVs have a null sequence. CSVs have no native notion of a null character. However, some CSV generators have created one, using characters such as
\N
to represent null.TIP: The text is un-escaped before the null sequence is matched, so don’t use the escape character in your null sequence.
-
(Optional) Delimiter - Specify the delimiter. The delimiter is a character used in CSV files to separate one field from the next. Fivetran tries to infer the delimiter, but in some cases, this is impossible. If your files sync with the wrong number of columns, consider setting this value.
-
If you leave this field blank, we infer the delimiter for each file. You can store files of many different types of delimiters in the same folder with no problems.
-
If you specify a delimiter, we parse all the CSV files in your folder path with this delimiter.
-
-
(Optional) Escape Character - Set the escape character if your CSV generator follows non-standard rules for escaping quotation marks.
Only use this field if you are sure your CSVs have a different escape character. CSVs have a special rule for escaping quotation marks compared to other characters; they require two consecutive double quotes to represent an escaped double quote. However, some CSV generators do not follow this rule and use different characters like backslash for escaping.
-
(Optional) Skip Header Lines - Use this option to skip over fixed-length headers at the beginning of your CSV files.
Some CSV-generating programs include additional header lines at the top of the file. The header consists of a few lines that do not match the format of the rest of the rows in the file. These header rows can cause undesired behavior because we attempt to parse them as if they were records in your CSV.
-
(Optional) Skip footer Lines - Use this option to skip over fixed-length footers at the end of your CSV files.
Some CSV-generating programs include a footer at the bottom of the file. The footer consists of a few lines that do not match the format of the rest of the rows in the file. These footer rows can cause undesired behavior because we attempt to parse them as if they were records in your CSV.
-
(Optional) Headerless Files - Set the toggle to ON if your CSV-generating software doesn’t provide a header line for the documents. Fivetran can generate the generic column names and sync data rows with them.
Some CSV-generating programs do not include column name headers for the files; they only contain data rows. When you set the toggle to ON, we generate generic column names following the convention of
column_0
,column_1
, …column_n
to map the rows.
-
-
Click Save & Test. Fivetran will take it from here.
Related Contentlink
description Connector Overview
settings API Connector Configuration