fix(etl): address Codex MCP review findings for Phase 2

- Filter MERGE SQL columns to only include columns that exist in destination
  (allColumns and updateColumns were using unfiltered source columns)
- Fix schema-qualified table names to use proper [schema].[table] format
  instead of wrapping entire name in single brackets
- Add empty column mapping validation to throw early if no columns intersect
- Add JdeDateTransformer output column collision detection in OnInitialize
- Add TODO comment for WithCommandTimeout (stored but not yet passed to
  destinations)
- Add tests for FormatQualifiedTableName and output column collision
This commit is contained in:
Joseph Doherty
2026-01-03 11:27:07 -05:00
parent fcd8b660fa
commit 7dcbacd5ca
7 changed files with 111 additions and 8 deletions
@@ -18,6 +18,15 @@ public static class CommonScripts
: ("dbo", parts[0]);
}
/// <summary>
/// Formats a table name as a properly quoted [schema].[table] identifier.
/// </summary>
public static string FormatQualifiedTableName(string tableName)
{
var (schema, table) = ParseTableName(tableName);
return $"[{schema}].[{table}]";
}
public static IScriptRunner DisableIndexes(
IDbConnectionFactory factory,
string tableName,