Skip to content

Commit

Permalink
fix: Add non-retryable error for Redsdhift batch exports
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Dec 4, 2024
1 parent 25f0eac commit a748e5c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions posthog/temporal/batch_exports/redshift_batch_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
start_batch_export_run,
start_produce_batch_export_record_batches,
)
from posthog.temporal.batch_exports.heartbeat import (
BatchExportRangeHeartbeatDetails,
DateRange,
should_resume_from_activity_heartbeat,
)
from posthog.temporal.batch_exports.metrics import get_rows_exported_metric
from posthog.temporal.batch_exports.postgres_batch_export import (
Fields,
Expand All @@ -47,11 +52,6 @@
from posthog.temporal.common.clickhouse import get_client
from posthog.temporal.common.heartbeat import Heartbeater
from posthog.temporal.common.logger import configure_temporal_worker_logger
from posthog.temporal.batch_exports.heartbeat import (
BatchExportRangeHeartbeatDetails,
DateRange,
should_resume_from_activity_heartbeat,
)


def remove_escaped_whitespace_recursive(value):
Expand Down Expand Up @@ -715,6 +715,8 @@ async def run(self, inputs: RedshiftBatchExportInputs):
"StringDataRightTruncation",
# Raised by our PostgreSQL client when failing to connect after several attempts.
"PostgreSQLConnectionError",
# Column missing in Redshift, likely the schema was altered.
"UndefinedColumn",
],
finish_inputs=finish_inputs,
)

0 comments on commit a748e5c

Please sign in to comment.