Staged Upload Destination
Generic async bulk-API destination: stage a file, trigger a job, optionally poll for completion. Core connector — no extra install.
This is a building block for vendor bulk/batch APIs that follow the upload → trigger → poll shape (many marketing / CRM / ad platforms). The whole batch is serialised once and pushed through the three phases.
YAML Example
destination:
type: staged_upload
format: csv # "csv" (default) | "json" | "jsonl"
rate_limit_key: vendor-account-a
stage:
url: https://api.example.com/v1/uploads
method: POST
auth: { type: bearer, token_env: VENDOR_TOKEN }
response_extract: { upload_id: "$.id", upload_url: "$.url" }
trigger:
url: https://api.example.com/v1/imports
method: POST
auth: { type: bearer, token_env: VENDOR_TOKEN }
body_template: '{"upload_id": "{{ upload_id }}"}'
response_extract: { job_id: "$.job_id" }
poll:
url: https://api.example.com/v1/imports/{{ job_id }}
status_field: status
success_values: [SUCCEEDED, COMPLETED]
failure_values: [FAILED, ERROR]
interval_seconds: 30
timeout_seconds: 3600
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
type | "staged_upload" | — | Required |
format | "csv" | "json" | "jsonl" | "csv" | Serialisation of the staged batch. |
rate_limit_key | string | null | null | Stable, non-secret identity of the vendor quota boundary; overrides host-derived rate-limit keying. |
stage | phase | — | Phase 1 — upload the file. Required |
trigger | phase | — | Phase 2 — kick off the import job. Required |
poll | poll | null | null | Phase 3 — poll the job to completion (optional; omit for fire-and-forget). |
Phase (stage / trigger): url, method (POST default), headers, auth, body_template, response_extract (a {name: JSONPath} map that pulls values out of the response for later phases — e.g. an upload ID or signed URL).
Poll (poll): url, method (GET default), headers, auth, status_field (default status), success_values (default [SUCCEEDED, COMPLETED]), failure_values (default [FAILED, ERROR]), interval_seconds (default 30), timeout_seconds (default 3600).
Rate limiting
By default, a staged upload with a poll phase uses the rendered poll URL's
hostname as its rate-limit identity; without polling, it uses the trigger
hostname. Set rate_limit_key when one vendor quota spans multiple regional
hosts, or when independent accounts share one centralized host. Configurations
with the same explicit key share a limiter bucket, so use a stable, non-secret
operator-defined label. Leaving it unset preserves the host-derived behavior.
How it works
- Stage — the batch is serialised (
format) and POSTed;response_extractcaptures values (e.g.upload_id). - Trigger —
body_template(with the staged values in scope) starts the import;response_extractcaptures thejob_id. - Poll — if configured, drt polls
urleveryinterval_secondsuntilstatus_fieldhits asuccess/failurevalue ortimeout_secondselapses.
auth: blocks accept the same shapes as the REST API destination.
Notes
- Core connector — no
pip installextras needed. - Empty batches short-circuit — no upload / trigger / poll is performed when the source produced no rows.
- Purpose-built siblings on top of the same idea: Salesforce Bulk API 2.0.