Target Configuration
Use this page when you need to define where a stream writes and what writer-specific settings apply to that target.
Every target configuration starts with target.id plus one target family under target.spec.
Target shape
The target object always looks like this:
{
"id": "conn_target",
"spec": {
"db": {}
}
}
Rules:
target.idselects the stored destination connectiontarget.speccontains exactly one target family- valid target families are
db,files, ands3
Database targets
Use target.spec.db when the stream writes to MySQL or PostgreSQL.
Typical shape:
{
"id": "conn_postgres_target",
"spec": {
"db": {
"database": "analytics",
"schema": "public",
"schemaPolicy": "create_missing_only",
"writeMode": "upsert"
}
}
}
Key points:
databaseselects the target databaseschemais optional and depends on the target enginestructureOptionscontrols what structure objects may be createdschemaPolicycontrols how existing tables are treatedwriteModecontrols how existing rows are treatedskipDataturns the run into structure-only output
Use Target Schema and Data Policies and Database Structure Options for the behavioral choices behind those fields.
Local file targets
Use target.spec.files when the stream should write CSV, JSONL, or Parquet files to a local filesystem connection.
Typical shape:
{
"id": "conn_files_local",
"spec": {
"files": {
"fileFormat": "parquet",
"format": {
"compression": "zstd"
}
}
}
}
Key points:
fileFormatchoosescsv,jsonl, orparquetformatholds compression and format-specific settingsoutputDirectoryis optional and is often omitted because the connection base path determines the final location
S3 targets
Use target.spec.s3 when the stream should write files locally and then upload them to S3-compatible storage.
Typical shape:
{
"id": "conn_s3_target",
"spec": {
"s3": {
"fileFormat": "parquet",
"format": {
"compression": "zstd"
},
"upload": {
"bucket": "analytics-exports",
"prefix": "daily/"
}
}
}
}
Key points:
outputDirectoryis the local staging area before uploadfileFormatandformatwork the same way as local file targetsuploadholds bucket, prefix, retention, and encryption behavior
Shared format settings
Use nested format settings under either target.spec.files.format or target.spec.s3.format.
Important notes:
compressionandparquetare consumed by file-based targets in the current backendcsvexists in the schema, but custom CSV target formatting is not wired into the writer path yet- Parquet settings are available through the API and saved configs even when the UI does not expose them
Upload settings
Use target.spec.s3.upload when the target is S3-compatible storage.
Important fields:
bucketfor the destination bucketprefixfor an optional object key prefixkeepLocalFileswhen staged files should remain after uploadstorageClass,serverSideEnc, andkmsKeyIdfor storage and encryption behavior
Verification
Before saving or using a target config:
- confirm
target.speccontains exactly one family object - confirm database targets keep policy fields under
target.spec.db - confirm file targets keep format fields under
target.spec.files.formatortarget.spec.s3.format - confirm S3 targets include
uploadsettings when remote upload behavior matters - confirm CSV target formatting expectations match the current writer defaults