fix(source-mssql): Allow CDC syncs without primary keys#78292
fix(source-mssql): Allow CDC syncs without primary keys#78292devin-ai-integration[bot] wants to merge 3 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
Detected
|
|
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
What
Resolves https://github.com/airbytehq/oncall/issues/12666:
Fixes source-mssql CDC discovery for SQL Server CDC-enabled tables that do not have a physical primary key. In version 4.4.7, those streams only advertised full refresh and did not expose CDC metadata fields, which blocked incremental CDC connection creation for valid all-changes capture tables.
Requested by API User via
/ai-fix.How
sourceDefinedPrimaryKeyempty andisResumable=falsefor PK-less CDC streams so the catalog does not imply dedup/resumable primary-key semantics.Declarative-First Evaluation
source-mssql is a Kotlin/Gradle connector, not a manifest-only or low-code connector. There is no declarative YAML manifest or custom Python component involved in this fix.
Breaking Change Evaluation
Not breaking. This does not remove or rename fields, change field types, change the primary key or cursor for existing incremental streams, remove streams, change config spec fields, or change state format. It only restores incremental CDC discovery metadata for CDC-enabled tables that previously lacked it.
Review guide
airbyte-integrations/connectors/source-mssql/src/main/kotlin/io/airbyte/integrations/source/mssql/MsSqlSourceOperations.ktairbyte-integrations/connectors/source-mssql/src/test/kotlin/io/airbyte/integrations/source/mssql/MsSqlSourceOperationsTest.ktairbyte-integrations/connectors/source-mssql/metadata.yamldocs/integrations/sources/mssql.mdUser Impact
Users can configure CDC incremental syncs for SQL Server tables that are CDC-enabled without a physical primary key. Those streams expose the CDC cursor and CDC metadata fields while remaining append-only/no-dedup from a primary-key perspective.
Test plan
./gradlew :airbyte-integrations:connectors:source-mssql:test --tests io.airbyte.integrations.source.mssql.MsSqlSourceOperationsTest./gradlew :airbyte-cdk:bulk:toolkits:bulk-cdk-toolkit-extract-jdbc:test --tests io.airbyte.cdk.discover.JdbcAirbyteStreamFactoryTest./gradlew :airbyte-integrations:connectors:source-mssql:assembleairbyte/source-mssql:devimage with:airbyte-integrations:connectors:source-mssql:dockerBuildImageafter generating Docker build args.airbyte/source-mssql:4.4.7discovered the PK-less CDC table with onlyfull_refreshand no CDC metadata; localairbyte/source-mssql:devdiscovered the same table withfull_refresh+incremental,_ab_cdc_cursor, CDC metadata fields, and empty primary key.Can this PR be safely reverted and rolled back?
Devin session
Important
Active progressive rollout warning for source-mssql.