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-imports): stop retrying numeric-column imports with non-numeric text (#73614)

Tom Owers7690187fecd6
diff --git a/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py b/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py
index 9a668536a1e2..187005add41c 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/external_data_job.py
@@ -139,6 +139,12 @@ Any_Source_Errors: dict[str, str | None] = {
"A column's type changed in your source and no longer fits the type we stored. We can't widen "
"an existing column in place — please reset and fully re-sync this table to adopt the new type."
),
+ # Raised in shared pipeline code (`table_from_py_list` → `_process_batch`) when a column imported
+ # as a number contains non-numeric text. The same cells fail identically on every retry regardless
+ # of source. Already non-retryable for Google Sheets via its own get_non_retryable_errors; declare
+ # it here so every other source stops retrying too. The enriched message names the offending column
+ # and shows example cells, so keep the raw error rather than replacing it with a generic one.
+ "must be real number, not str": None,
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/pipelines/core/test/test_utils.py b/products/warehouse_sources/backend/temporal/data_imports/pipelines/core/test/test_utils.py
index 01d0c234ee92..485d4c7a252c 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/pipelines/core/test/test_utils.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/pipelines/core/test/test_utils.py
@@ -17,6 +17,7 @@ from structlog.types import FilteringBoundLogger
from posthog.temporal.common.errors import NonReportableError
+from products.warehouse_sources.backend.temporal.data_imports.external_data_job import Any_Source_Errors
from products.warehouse_sources.backend.temporal.data_imports.pipelines.core.arrow_utils import (
BillingLimitsWillBeReachedException,
SchemaColumnTypeChangedException,
@@ -93,6 +94,9 @@ def test_table_from_py_list_numeric_column_with_non_numeric_value_raises_named_e
assert "revenue" in message
assert "N/A" in message
assert "<blank>" in message
+ # The message must stay matched by an Any_Source_Errors entry so the schema is paused with
+ # guidance instead of retrying the same non-numeric cells forever, on every source.
+ assert [key for key in Any_Source_Errors if key in message]
def test_table_from_py_list_numeric_column_coerces_numeric_string_values():