Skip to main content

Amplitude Destination

Sync user properties or events from your warehouse to Amplitude via the Identify API or HTTP V2 API.

YAML Example — user properties (Identify)​

destination:
type: amplitude
api_key_env: AMPLITUDE_API_KEY
endpoint: identify
user_id_field: user_id
properties_template: |
{
"ltv_segment": "{{ row.ltv_segment }}",
"plan": "{{ row.plan }}"
}

YAML Example — events (HTTP V2)​

destination:
type: amplitude
api_key_env: AMPLITUDE_API_KEY
endpoint: event
user_id_field: user_id
event_type_field: event_name
time_field: event_time

Configuration​

FieldTypeDefaultDescription
type"amplitude"—Required
api_keystring | nullnullAmplitude project API key (direct value)
api_key_envstring | nullAMPLITUDE_API_KEYEnv var containing API key
regiondefault|eudefaultAPI region (api2.amplitude.com vs api.eu.amplitude.com)
endpointidentify|eventidentifyIdentify API or HTTP V2 events API
user_id_fieldstringuser_idSource column for Amplitude user_id
device_id_fieldstring | nullnullSource column for Amplitude device_id
event_type_fieldstring | nullnullSource column for event_type (required for endpoint: event unless event_type set)
event_typestring | nullnullConstant event name (alternative to event_type_field)
time_fieldstring | nullnullSource column for event time (milliseconds)
insert_id_fieldstring | nullnullSource column for deduplication insert_id
properties_templatestring | nullnullJinja2 template rendering a JSON object merged into user_properties or event_properties
batch_sizeint1000Records per API request (clamped to 1–1000)
min_id_lengthint | nullnullPassed to Amplitude options.min_id_length when set
retryRetryConfig | nullnullDestination-level retry override

Authentication​

Copy your project API key from Amplitude Settings → Projects, then:

export AMPLITUDE_API_KEY="your-api-key"

The API key is sent in the JSON request body (Amplitude does not use Bearer auth).

Common Patterns​

Sync LTV segments and plan tier (user properties):

destination:
type: amplitude
api_key_env: AMPLITUDE_API_KEY
endpoint: identify
user_id_field: user_id

Warehouse columns not mapped to identity fields become user_properties automatically.

Backfill historical events from SQL:

destination:
type: amplitude
endpoint: event
event_type: warehouse_backfill
user_id_field: user_id
time_field: event_timestamp_ms
sync:
rate_limit:
requests_per_second: 10

EU data residency:

destination:
type: amplitude
region: eu
api_key_env: AMPLITUDE_API_KEY_EU

Rate limiting​

Vendor limit: Amplitude throttles per project by device/user throughput rather than a flat req/s (the HTTP V2 API documents limits in events/second per device id). drt applies no automatic cap here — for large backfills set one explicitly:

destination:
type: amplitude
endpoint: event
rate_limit:
requests_per_second: 10
burst: 20 # optional: let idle time bank up to 20 requests

destination.rate_limit beats sync.rate_limit, which beats the default of 10/s.

The limiter is shared per project and region (API key + region). The identify and event endpoints bill against one project quota, so they share a bucket — but region: eu is a genuinely different host with its own budget and gets its own. Several syncs into one project concurrently (drt run --threads 4) pace through one bucket; when they request different rates, the lowest wins for both.

Notes​

  • Use separate sync YAMLs for identify vs events (one endpoint per destination config).
  • Amplitude requires user_id or device_id on each row; user_id defaults to minimum 5 characters unless min_id_length is set.
  • insert_id is auto-generated from row content when not provided, enabling safe retries without duplicate events.
  • For large backfills, set rate_limit.requests_per_second conservatively (e.g. 10) to avoid 429 throttling.
  • See HTTP V2 API and Identify API for payload details.