Configure file formatting options for file-based destinations
The option to configure various file formatting options for the exported files is available to you when you connect to a file-based destination, such as Amazon S3, Azure Blob, or SFTP.
You can configure various file formatting options for exported files by using the Experience Platform UI. You can modify several properties of the exported files to match the requirements of the file reception system on your side, in order to optimally read and interpret the files received from Experience Platform.
File formatting configuration for CSV files file-configuration
To display the file formatting options, start the connect to destination workflow. Select Data type: Segments and File type: CSV to display the file formatting settings available for the exported CSV
files.
Delimiter delimiter
Use this control to set a separator for each field and value in the exported CSV files. Available options are:
- Colon
(:)
- Comma
(,)
- Pipe
(|)
- Semicolon
(;)
- Tab
(\t)
Examples
View the examples below of the content in the exported CSV files with each of the selections in the UI.
- Example output with Colon
(:)
selected:male:John:Doe
- Example output with Comma
(,)
selected:male,John,Doe
- Example output with Pipe
(|)
selected:male|John|Doe
- Example output with Semicolon
(;)
selected:male;John;Doe
- Example output with Tab
(\t)
selected:male \t John \t Doe
Quote character quote-character
Use this option to control whether double quotes should be removed or kept within exported strings.
The available options are:
- Null Character (\0000). Use this option to remove double quotes from exported CSV files.
- Double Quotes ("). Use this option when the string values contain a delimiter or double quotes. This option helps you keep the delimiters or double quotes in your exported CSV files, so you can correctly identify which value corresponds to which field.
Examples
Consider the input value Anna,"Doe,John"
.
View the examples below of the content from exported CSV files with each of the selections in the UI.
- Example output with Null Character (\0000) selected:
Anna,Doe,John
- Example output with Double Quotes (") selected:
Anna,"Doe,John"
Escape character escape-character
Use this option to set a single character for escaping quotes inside an already quoted value. For example, this option is useful when you have a string enclosed in double quotes where part of the string is already enclosed in double quotes. This option determines which character to replace the inner double quotes with. Available options are:
- Back slash
(\)
- Single quote
(')
Examples
View the examples below of the content from exported CSV files with each of the selections in the UI.
- Example output with Back slash
(\)
selected:"Test,\"John\",LastName"
- Example output with Single quote
(')
selected:"Test,'"John'",LastName"
Empty value output empty-value-output
Use this control to set the string representation of an empty value. This option determines how empty values are represented in your exported CSV files. Available options are:
- Null (null)
- Empty String in Double Quotes (“”)
- Empty string
Examples
View the examples below of the content from exported CSV files with each of the selections in the UI.
- Example output with null selected:
male,NULL,TestLastName
. In this case, Experience Platform transforms the empty value into a null value. - Example output with “” selected:
male,"",TestLastName
. In this case, Experience Platform transforms the empty value into a pair of double quotes. - Example output with Empty string selected:
male,,TestLastName
. In this case, the Experience Platform maintains the empty value and exports it as it is (without double quotes).
Null value output null-value-output
Use this control to set the string representation of a null value within the exported files. This option determines how null values are represented in your exported CSV files. Available options are:
- Null (null)
- Empty String in Double Quotes (“”)
- Empty string
Examples
View the examples below of the content from exported CSV files with each of the selections in the UI.
- Example output with null selected:
male,NULL,TestLastName
. In this case, no transformation occurs and the CSV file contains the null value. - Example output with “” selected:
male,"",TestLastName
. In this case, Experience Platform replaces the null value with double quotes around an empty string. - Example output with Empty string selected:
male,,TestLastName
. In this case, Experience Platform replaces the null value with an empty string (without double quotes).
Compression format compression-format
Sets which compression type to use when saving data to file. Supported options are GZIP and NONE. This option determines whether you will be exporting compressed files or not.
Encoding
Not shown in the UI screenshot. Specifies encoding (charset) of saved CSV files. Options are UTF-8 or UTF-16.
Char to escape quote
Not shown in the UI screenshot. A flag indicating whether values containing quotes should always be enclosed in quotes.
Default is to escape all values containing a quote character.
Line separator
Not shown in the UI screenshot. Defines the line separator that should be used for writing. Maximum length is 1 character.
Ignore leading whitespace
Not shown in the UI screenshot. A flag indicating whether or not leading whitespaces from values being exported should be skipped.
Example output with True selected: "male","John","TestLastName"
Example output with False selected: " male","John","TestLastName"
Ignore trailing whitespace
Not shown in the UI screenshot. A flag indicating whether or not trailing whitespaces from values being exported should be skipped.
Example output with True selected: "male","John","TestLastName"
Example output with False selected: "male ","John","TestLastName"
Next steps next-steps
After reading this document, you now know how to configure file export options for your CSV data files to tailor the file contents to the requirements of your downstream file reception system. Next, you can read the file-based destinations activation tutorial to start exporting files to your preferred cloud storage location.