diff --git a/lib/destination/ddl/ddl.go b/lib/destination/ddl/ddl.go index 96ffbc64b..5bcb48c5e 100644 --- a/lib/destination/ddl/ddl.go +++ b/lib/destination/ddl/ddl.go @@ -19,7 +19,7 @@ import ( // It has a safety check to make sure the tableName contains the `constants.ArtiePrefix` key. // Temporary tables look like this: database.schema.tableName__artie__RANDOM_STRING(5)_expiryUnixTs func DropTemporaryTable(dwh destination.DataWarehouse, tableIdentifier sql.TableIdentifier, shouldReturnError bool) error { - if strings.Contains(tableIdentifier.Table(), constants.ArtiePrefix) { + if strings.Contains(strings.ToLower(tableIdentifier.Table()), constants.ArtiePrefix) { sqlCommand := fmt.Sprintf("DROP TABLE IF EXISTS %s", tableIdentifier.FullyQualifiedName()) if _, err := dwh.Exec(sqlCommand); err != nil { slog.Warn("Failed to drop temporary table, it will get garbage collected by the TTL...",