#3402 WIP: Load method strategies
Pull request opened by
edgarrmondragon on <!date^1764805717^{date_short}|2025-12-03T23:48:37Z>
Summary by Sourcery
Introduce pluggable SQL load strategies and loaders to support append-only, overwrite, and upsert load methods with backward-compatible behavior.
New Features:
• Add LoadMethodStrategy hierarchy and concrete append-only, overwrite, and upsert strategies for SQL sinks.
• Introduce reusable Loader classes (simple insert, temp-table upsert, and merge-based upsert) for database-agnostic DML handling.
• Expose load strategies and loaders from the sql package for easier customization by targets.
Enhancements:
• Wire SQLConnector and SQLSink to select and use load strategies based on configuration while preserving legacy table preparation as a fallback.
• Enable SQLSink to delegate table preparation and batch loading to the selected load strategy, including config validation and capability checks.
Tests:
• Add comprehensive tests for load strategies, loaders, and factory selection behavior, including append-only, overwrite, upsert, and custom merge scenarios.
• Update the dummy SQL connector used in sink tests to declare support for overwrite and merge-upsert load methods.
meltano/sdk