:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix: Pass include/exclude events to batch export (#60626)
Tomás Farías Santanae47333a78068
diff --git a/posthog/batch_exports/api/file_download.py b/posthog/batch_exports/api/file_download.pyindex b9f9273b7681..82c813fca056 100644--- a/posthog/batch_exports/api/file_download.py+++ b/posthog/batch_exports/api/file_download.py@@ -281,6 +281,8 @@ class FileDownloadBatchExportOnDemandViewSet(compression=instance.batch_export_on_demand.destination.config.get("compression", None),format=instance.batch_export_on_demand.destination.config.get("format", "Parquet"),max_size_mb=instance.batch_export_on_demand.destination.config.get("max_size_mb", 0),+ include_events=instance.batch_export_on_demand.destination.config.get("include_events", None),+ exclude_events=instance.batch_export_on_demand.destination.config.get("exclude_events", None),)except Exception:LOGGER.exception("batch_export_on_demand.fail_to_start")diff --git a/products/batch_exports/backend/service.py b/products/batch_exports/backend/service.pyindex 228cf945ca96..483e5b041df5 100644--- a/products/batch_exports/backend/service.py+++ b/products/batch_exports/backend/service.py@@ -849,6 +849,8 @@ def start_file_download_batch_export(compression: str | None = None,format: str = "Parquet",max_size_mb: int = 0,+ include_events: list[str] | None = None,+ exclude_events: list[str] | None = None,) -> None:inputs = FileDownloadBatchExportInputs(batch_export_id=batch_export.id,@@ -859,6 +861,8 @@ def start_file_download_batch_export(compression=compression,file_format=format,max_file_size_mb=max_size_mb,+ include_events=include_events,+ exclude_events=exclude_events,)temporal = sync_connect()