Skip to content

Amplitude

Amplitude is a product analytics platform used to track and analyze user behavior across web and mobile applications.

Bruin supports Amplitude as a source for Ingestr assets. You can ingest data from Amplitude into your data platform.

To set up an Amplitude connection, add a configuration item in the .bruin.yml file and in your asset file. You authenticate with your project's api_key and secret_key. Optionally you can set region (defaults to us).

Follow these steps to set up Amplitude and run ingestion.

Configuration

Step 1: Add a connection to the .bruin.yml file

yaml
connections:
  amplitude:
    - name: "amplitude"
      api_key: "your-api-key"
      secret_key: "your-secret-key"
      region: "us"
  • api_key: (Required) Amplitude project API key.
  • secret_key: (Required) Amplitude project secret key.
  • region: (Optional) Data residency region (us or eu). Defaults to us.

Step 2: Create an asset file for data ingestion

Create an asset configuration file (e.g., amplitude_ingestion.yml) inside the assets folder with the following content:

yaml
name: public.amplitude
type: ingestr

parameters:
  source_connection: amplitude
  source_table: 'events'

  destination: postgres
  • name: The name of the asset.
  • type: Always ingestr for Amplitude.
  • source_connection: The Amplitude connection name defined in .bruin.yml.
  • source_table: Name of the Amplitude table to ingest.
  • destination: The destination connection name.

Available Source Tables

TablePKInc KeyInc StrategyDetails
eventsuuidevent_timemergeRaw event data, ingested incrementally.
cohortsidreplaceBehavioral cohorts.
annotationsidreplaceChart annotations.
event_typesevent_typereplaceEvent type definitions.
event_categoriesidreplaceEvent categories.
event_propertiesevent_propertyreplaceEvent property definitions.
user_propertiesuser_propertyreplaceUser property definitions.

The events table is loaded incrementally (merge on uuid using event_time). All other tables are fully refreshed on each run (replace).

Step 3: Run asset to ingest data

bash
bruin run assets/amplitude_ingestion.yml

Running this command ingests data from Amplitude into your Postgres database.