fix(redshift): normalize table names to lowercase for CSV uploads (#37019)

This commit is contained in:
Jean Massucatto
2026-01-23 17:40:38 -03:00
committed by GitHub
parent 5747fb1e85
commit e8363cf606
4 changed files with 74 additions and 0 deletions

View File

@@ -1295,6 +1295,26 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
return None
@classmethod
def normalize_table_name_for_upload(
cls,
table_name: str,
schema_name: str | None = None,
) -> tuple[str, str | None]:
"""
Normalize table and schema names for file upload.
Some databases (e.g., Redshift) fold unquoted identifiers to lowercase,
which can cause issues when the upload creates a table with one case
but metadata operations use a different case. Override this method
to normalize names according to database-specific rules.
:param table_name: The table name to normalize
:param schema_name: The schema name to normalize (optional)
:return: Tuple of (normalized_table_name, normalized_schema_name)
"""
return table_name, schema_name
@classmethod
def df_to_sql(
cls,