Follow our setup guide to connect Dropbox to Fivetran.
IMPORTANT: This setup guide is applicable only for Dropbox connectors created before October 7, 2021.
Prerequisiteslink
To connect Dropbox to Fivetran, you need:
- A Dropbox account containing files with supported file types and encodings
- The ability to grant Fivetran permission to read from this account
Setup instructionslink
-
In the connector setup form, enter the Destination schema name of your choice.
-
Enter the Destination table name.
-
Click Authorize. You will be redirected to your Dropbox account to authorize Fivetran’s access.
-
Log in to your Dropbox account to authorize Fivetran’s read access to your files. Once you have finished, you will be redirected back to the setup form.
-
In the setup form, choose your configuration options. Using these configuration options, you can select subsets of your folders, certain types of files, and more to sync only the files you need in your destination. Setting up multiple Dropbox connectors targeted at the same file system, but with different options, can allow you to slice and dice a file system any way you’d like.
-
Root Folder in Team Space Select this option if your Dropbox account has the team spaces feature and the folder/file you want to sync is present in your root namespace.
-
Folder Path (Optional) This folder path is used to specify a portion of the file system in which you’d like Fivetran to look for files. Any files under the specified folder and all of its nested subfolders will be examined for files we can upload. If no prefix is supplied, we’ll look through the entire file system for files to sync.
-
File Pattern (Optional) The file pattern is a regular expression that we use to decide whether or not to sync certain files. It applies to everything under the prefix. For instance, suppose under the prefix
logs
you had three folders:2017
,2016
, anderrors
. Using the pattern\d\d\d\d/.*
, you could 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 because.*
after/
applies to any files in these folders. If you’re not sure what regular expression to use, you can leave this field blank, and we’ll sync everything under the prefix. If you’re feeling particularly bold, you can learn to write your own regex here and test it out using this tool. -
File Type The file type is used to let Fivetran know that even files without a file extension ought to be parsed as this file type. For example, if you have an automated CSV output system that saves files without a .csv extension, you can specify the CSV type and we will sync them correctly as CSVs. Selecting “infer” will let Fivetran infer from a file’s extension (
.csv
,.tsv
,.json
,.avro
, or.log
) what to sync. If you do choose a file type, every file we examine will be interpreted as the file type you select, so make sure everything Fivetran syncs has the same file type! -
Compression The compression format is used to let Fivetran know that even files without a compression extension should be decompressed using the selected compression format. 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. The integration will then decompress every file that it examines using GZIP. If all of your compressed files are correctly marked with a matching compression extension (
.bz2
,.gz
,.gzip
,.tar
, or.zip
), you can select “infer”. -
Error Handling Selecting skip ignores any improperly formatted data within a file, allowing you to sync only valid data. Choosing fail enables you to prevent a file from syncing if any improperly formatted data is detected. With either option you will receive a notification on your dashboard if errors are encountered.
-
-
(Optional) If you’d like, you can set the Show Advanced Options toggle to ON. Note that these options are for advanced configuration, and are only necessary in highly specific cases.
-
Modified File Merge When a previously synced file is modified, should the rows in the destination be replaced or should the new rows be appended to the table.
upsert_file
option will replace records in destination, using the filename and line number as the primary key.append_file
option will append records. -
Archive Folder Pattern If there are multiple files within archive (TAR or ZIP) folders, you can use the archive folder pattern to filter those as well. For example, the archive folder pattern
.*json
will sync from an archive folder only those files that end in a .json file extension. -
Null Sequence (Optional) CSVs have no native notion of a null character. However, some CSV generators have created one, using characters such as
\N
to represent null. Note: text is un-escaped before the null sequence is matched, so don’t use the escape character in your null sequence. Only use this field if you are sure your CSVs have a null sequence. -
Delimiter (Optional) The delimiter is a character used in CSV files to separate one field from the next. If this is left blank, Fivetran will infer the delimiter for each file, and files of many different types of delimiters can be stored in the same folder with no problems. If this is not left blank, then all CSV files in your search path will be parsed with this delimiter.
-
Escape Character (Optional) CSVs have a special rule for escaping quotation marks as opposed 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 other characters like backslash for escaping. Only use this field if you are sure your CSVs have a different escape character.
-
Skip Header Lines (Optional) Some CSV generating programs include additional header lines at the top of the file. They consist of few lines that do not match the format of the rest of the rows in the file. These header rows can cause undesired behavior in Fivetran because we attempt to parse them as if they were records in your CSV. By setting this value, you can skip fixed-length headers at the beginning of your CSV files.
-
Skip footer Lines (Optional) Some CSV generating programs include a footer at the bottom of the file. It 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 in Fivetran because we attempt to parse them as if they were records in your CSV. By setting this value, you can skip fixed-length footers at the end of your CSV files.
-
Headerless Files (Optional) Some CSV generating programs do not include column name headers for the files — they only contain data rows. By setting this value, you request Fivetran to 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 and sync your data from your Dropbox account.
API connector configlink
IMPORTANT: We have disabled the creation of connectors using the API. Use the following details to modify existing connectors.
Requestlink
POST https://api.fivetran.com/v1/connectors
{
"service": "dropbox",
"group_id": "target_group_id",
"config": {
"schema": "test_dropbox",
"table": "dest_table",
"prefix": "folder_path",
"pattern": "file_pattern",
"file_type": "infer",
"compression": "infer",
"on_error": "fail",
"append_file_option": "upsert_file",
"archive_pattern": "regex_pattern",
"null_sequence": "",
"delimiter": "|",
"escape_char": "escape_char",
"skip_before": "0",
"skip_after": "0"
}
}
Config parameters
Name | Description | Possible Values |
---|---|---|
schema (required) |
The connector schema name has to be unique within the group (destination). | |
table (required) |
The table name within the schema to which the connector will sync the data. | |
prefix |
All files and folders under this folder path will be searched for files to sync. | |
pattern |
All files in your search path matching this regular expression will be synced. | |
file_type |
If your files are saved with improper extensions, you can force them to be synced as the selected filetype. | infer , csv , json , tsv , avro , parquet |
compression |
The compression format is used to let Fivetran know that even files without a compression extension should be decompressed using the selected compression format. | infer , uncompressed , tar , tar_bz2 , tar_gz |
on_error |
If you know that your files contain some errors, you can choose to have poorly formatted lines skipped. We recommend leaving the value as fail unless you are certain that you have undesirable, malformed data. | fail , skip |
append_file_option |
If you know that the source completely over-writes the same file with new data, you can append the changes instead of upserting based on filename and line number. | upsert_file , append_file |
archive_pattern |
Files inside of compressed archives with filenames matching this regular expression will be synced. | |
null_sequence |
If your CSVs use a special value indicating null, you can specify it here. | |
delimiter |
You can specify the delimiter that your CSVs use here. Fivetran generally tries to infer the delimiter, but in some cases this is impossible. | |
escape_char |
If your CSV generator follows non-standard rules for escaping quotation marks, you can set the escape character here. | |
skip_before |
We will skip over the number of lines specified before syncing data. | |
skip_after |
We will skip over the number of lines specified at the end so as to not introduce aberrant data into your destination. |
Authorizationlink
This type of connector can only be authorized through the Connect Card or through the Fivetran dashboard.
Related Contentlink
description Connector Overview