diff --git a/posthog/temporal/data_imports/pipelines/sql_database/helpers.py b/posthog/temporal/data_imports/pipelines/sql_database/helpers.py index 653f93392466c..894407beda8a0 100644 --- a/posthog/temporal/data_imports/pipelines/sql_database/helpers.py +++ b/posthog/temporal/data_imports/pipelines/sql_database/helpers.py @@ -35,9 +35,12 @@ def __init__( try: self.cursor_column: Optional[Column[Any]] = table.c[incremental.cursor_path] except KeyError as e: - raise KeyError( - f"Cursor column '{incremental.cursor_path}' does not exist in table '{table.name}'" - ) from e + try: + self.cursor_column = table.c[incremental.cursor_path.lower()] + except KeyError: + raise KeyError( + f"Cursor column '{incremental.cursor_path}' does not exist in table '{table.name}'" + ) from e self.last_value = incremental.last_value else: self.cursor_column = None