diff --git a/clients/shared/merge.go b/clients/shared/merge.go index 2d4fb20d2..36f111cb3 100644 --- a/clients/shared/merge.go +++ b/clients/shared/merge.go @@ -54,7 +54,14 @@ func Merge(ctx context.Context, dwh destination.DataWarehouse, tableData *optimi // TODO: Examine whether [AuditColumnsToDelete] still needs to be called. tableConfig.AuditColumnsToDelete(srcKeysMissing) if err = tableData.MergeColumnsFromDestination(tableConfig.GetColumns()...); err != nil { - return fmt.Errorf("failed to merge columns from destination: %w", err) + slog.Error("failed to merge columns from destination", + slog.Any("err", err), + slog.String("tableName", tableID.FullyQualifiedName()), + slog.Any("srcKeysMissing", srcKeysMissing), + slog.Any("targetKeysMissing", targetKeysMissing), + ) + + return fmt.Errorf("failed to merge columns from destination: %w for table %q", err, tableData.Name()) } temporaryTableID := TempTableIDWithSuffix(dwh.IdentifierFor(tableData.TopicConfig(), tableData.Name()), tableData.TempTableSuffix())