For the complete documentation index, see llms.txt. This page is also available as Markdown.

File destination

Define where and how generated files are delivered - SFTP, S3, or Google Cloud Storage.

Your goal

Declare a delivery target for the files the platform generates, so a feed can write to it - a partner's SFTP, your S3 bucket, a Google Cloud Storage bucket.

Expected outcome

A validated destination with a token, ready to be referenced, and file paths and names that make the output easy to consume downstream.

What a destination file is

A destination file defines where and how data files generated by the platform are delivered. It is configured in Computing Console.

Typical uses:

  • Sending an audience segment's user identifiers to an external partner for activation.

  • Supporting custom connectors that rely on file-based delivery.

Supported targets:

Type
What it is

SFTP

Secure file transfer over SSH.

S3

Amazon S3 buckets.

GOOGLE_CLOUD_STORAGE

Google Cloud Storage buckets.

Set one up

Setup is done in Computing Console > File destinations.

1

Create the destination

Click New file delivery destination, fill in the configuration fields below, and save.

2

Add the credentials

In the action menu of the destination, select Credentials. Copy the provided template - it differs per storage type - fill in the required fields, and save.

Once saved, you cannot read the credentials file again. You can overwrite it.

3

Validate the connection

In the action menu, select Validate.

To validate, the integration user must have an Editor role on the object storage - or equivalent - with permission to create and delete a temporary empty file for verification.

4

Use it

Reference the destination from a feed using its token.

Configuration fields

General information

Field
Description

Name

Human-readable name used in the interface.

Technical name

Internal identifier used by connectors. Referenced in plugin code, with no functional impact by itself.

Type

SFTP, S3, or GOOGLE_CLOUD_STORAGE.

Deduplicate

When enabled, removes perfect duplicates within a file - two strictly identical rows.

File information

Field
Description

File path macro

Path from the root of the destination where the file is written. Must not start with / and must end with /. Supports macros.

File name macro

The file name to generate. Supports macros.

Compression

NONE, GZIP, or ZIP.

Encoding

Character encoding. Recommended and supported: UTF-8.

File header macro

Optional header written at the top of the file, for instance column names. Can be empty. Supports macros.

Macros

Macros rely on Freemarker templating, and can be used in the file path, the file name, and the file header. They are what let you organise files dynamically by time, segment, or feed configuration.

Macro
What it evaluates to

DATE

The date at which the file is generated.

PROPERTY

A property defined in the plugin configuration.

SEGMENT.ID

The segment ID.

SEGMENT.TECHNICAL_NAME

The segment technical name.

GROUPING_KEY

The grouping_key defined in the plugin code. Plugin context only.

RANDOM_UUID

A random UUID, for uniqueness.

Freemarker date formatting structures folders:

produces:

A complete example

File path macro

File name macro

This produces monthly-partitioned files, uniquely identified per execution.

The grouping key

The grouping key is used exclusively in plugins, during the user_segment_update phase, to control how records are aggregated. It defines which records belong to the same logical file stream: records sharing a grouping key value are written into the same file or files.

It is defined in the plugin code, not in the destination configuration - the destination references it through ${GROUPING_KEY}.

Strategy
Effect

Group by segment_id

Accumulates records belonging to the same segment. Can mix data from several plugin instances targeting the same segment. Useful for segment-centric exports.

Group by datamart_id

Accumulates records from all plugin instances in the same datamart. Produces consolidated datamart-level exports.

Group by feed_id

Accumulates records from a single plugin instance only. Ensures strict isolation between feeds.

Upload triggers

You must choose one trigger type. A file is uploaded as soon as one of the active conditions is met.

Field
Description

File max size (KB)

As soon as the aggregated data reaches this size, the file is uploaded immediately. Recommended value: 100,000 KB, about 100 MB.

Min upload per day

Controls the upload frequency - the number of upload windows per rolling 24-hour period. Acts as a secondary trigger when the size is not reached.

File max size is always the main limiting factor. While records are written, reaching the size limit uploads the file immediately, regardless of time-based settings.

Example 1 - File max size = 100000, Min upload per day = 1

Files are uploaded when they reach 100 MB; otherwise at the end of a rolling 24-hour period. This does not guarantee daily delivery if the feed produces no data, and suits unpredictable volumes that may need more than one file per day.

Example 2 - File max size = 100000, Min upload per day = 24

Files are uploaded when they reach 100 MB; otherwise at the end of a rolling 1-hour period. This caps delivery at at most one file per hour, and is not suitable if more than one file per hour is required.

Field
Description

Max upload per day

Divides a rolling 24-hour period into equal upload windows to cap the daily file count. Uploads are only delayed if the destination server is still processing the previous file.

Files are then uploaded so as to respect the maximum number of files over the period.

If a file with exactly the same name is already present on the destination server, the upload is delayed and the incoming data is aggregated into the next upload. This is a reason to include ${RANDOM_UUID} or a timestamp in the file name macro.

Best practices

  • Use compression for large exports, to reduce transfer and storage costs.

  • Prefer date-based partitioning in paths - it simplifies downstream processing and retention.

  • Make file names unique unless you deliberately want aggregation into an existing file.

Verify

  • Validate succeeds on the destination, which confirms the credentials and the write permission.

  • A first delivery arrives at the expected path, with the expected name.

  • Macros are resolved in the delivered path and name - a literal ${DATE} means the macro was not evaluated.

  • File sizes and delivery frequency match the trigger you configured.

Last updated

Was this helpful?