Skip to content

: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.

fix(data-warehouse): default hubspot partitioning to month, not week (#75071)

Daniel RC0bf50d873467
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/hubspot.py b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/hubspot.py
index 6e5e631020ef..fe6a2aad411a 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/hubspot.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/hubspot/hubspot.py
@@ -824,6 +824,10 @@ def hubspot_source(
partition_count=1,
partition_size=1,
partition_mode="datetime" if endpoint_config.partition_key else None,
- partition_format="week" if endpoint_config.partition_key else None,
+ # Month, not finer: the partition key is a creation date while the incremental cursor is
+ # last-modified, so each batch touches partitions across the portal's whole history and the
+ # merge commits once per touched partition. Auto-repartition steps finer if a month
+ # partition ever outgrows the budget.
+ partition_format="month" if endpoint_config.partition_key else None,
partition_keys=[endpoint_config.partition_key] if endpoint_config.partition_key else None,
)