Mixpanel Source PluginLatest: v2.0.0
The CloudQuery Mixpanel plugin pulls data from Mixpanel and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more).
In order to fetch information from Mixpanel,
cloudquery needs to be authenticated using a Service Account (opens in a new tab) from your Mixpanel account. You can view and manage your Service Accounts in Mixpanel
Organization Settings > Service Accounts.
This example syncs from Mixpanel to a Postgres destination. The (top level) source spec section is described in the Source Spec Reference.
kind: source # Common source-plugin configuration spec: name: mixpanel path: cloudquery/mixpanel version: "v2.0.0" tables: ["*"] destinations: ["postgresql"] backend: local # Mixpanel specific configuration spec: username: "<YOUR_SERVICE_ACCOUNT_USER_HERE>" secret: "<YOUR_SERVICE_ACCOUNT_SECRET_HERE>" project_id: 12345 # Your project ID
The Mixpanel plugin supports incremental syncing for event data. This means that only new events will be fetched from Mixpanel and loaded into your destination. This is done by keeping track of the last event fetched and only fetching events that has been created since then.
To enable this,
backend option must be set in the spec (as shown in the example). This is documented in the Managing Incremental Tables section.
This is the (nested) spec used by the Mixpanel source plugin:
username(string, required): Your Service Account username from Mixpanel.
secret(string, required): Service Account secret.
project_id(integer, required): ID of the Mixpanel project to sync data from.
workspace_id(integer, optional): ID of the Mixpanel workspace to sync data from.
start_date(date in YYYY-MM-DD format, optional): Start date to sync data from. Defaults to 30 days ago.
end_date(date in YYYY-MM-DD format, optional): End date to sync data until. Defaults to today.
region(string, optional): Your Mixpanel region. Defaults to "US". Possible values are "US" and "EU".
timeout_secs(integer in seconds, optional. Default: 30): Timeout for requests against the Mixpanel API.
max_retries(integer, optional. Default: 5): Number of retries if a request was rate limited at the API endpoint.