# Mixpanel Tasks
This module contains a collection of tasks to interact with Mixpanel APIs.
# MixpanelExportTask
class
prefect.tasks.mixpanel.mixpanel_tasks.MixpanelExportTask
(api_secret=None, api_secret_env_var=None, from_date="2011-07-10", to_date="2024-07-31", limit=None, event=None, where=None, parse_response=False, use_eu_server=False, group_events=False, **kwargs)[source]Task for performing an export using the Mixpanel Export API. More info about the API can be found at https://developer.mixpanel.com/reference/raw-event-export.
Args:
api_secret (str, optional)
: The API secret key to use to authenticate to Mixpanel. Can be provided also via env var.api_secret_env_var (str, optional)
: The name of the env var that contains the API secret key to use to authenticate to Mixpanel.api_secret
takes precedence overapi_secret_env_var
.from_date (str, optional)
: Start date of the export request. If provided as a string, it should be in the formatYYYY-MM-DD
. Default value is2011-07-10
. This date is inclusive.to_date (str, optional)
: End date of the export request. If provided as a string, it should be in the formatYYYY-MM-DD
. Default value isprefect.context.today
. This date is inclusive.limit (int, optional)
: The max number of events to return.event (str, list, optional)
: The event, or events, that you wish to get the data for.where (str, optional)
: An expression to filter events by. More info on expression sequence structure can be found at https://developer.mixpanel.com/reference/segmentation-expressions.parse_response (bool, optional)
: Whether to parse the response into a JSON object. Default value isFalse
.use_eu_server (bool, optional)
: Whether to use the Mixpanel EU server to retrieve data. More info at https://help.mixpanel.com/hc/en-us/articles/360039135652-Data-Residency-in-EU. Default isFalse
.group_events
: Whether to group events with the same name. This is taken into account only ifparse_response
is True.**kwargs (dict, optional)
: Additional keyword arguments to pass to the Task constructor.
methods: |
---|
prefect.tasks.mixpanel.mixpanel_tasks.MixpanelExportTask.run (api_secret=None, api_secret_env_var=None, from_date=None, to_date=None, limit=None, event=None, where=None, parse_response=False, use_eu_server=False, group_events=False)[source] |
Task run method to request a data export from Mixpanel using the Export API.
|
This documentation was auto-generated from commit bd9182e
on July 31, 2024 at 18:02 UTC