Kafka - ConnectWhy does the Kafka JDBC sink connector require a primary key or unique identifier in the target table?ATo perform upserts and avoid duplicate rowsBTo speed up data transfer by batchingCTo enable file uploads to S3DTo index data in ElasticsearchCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand JDBC sink behaviorThe sink connector uses primary keys to identify rows for updates or inserts (upserts).Step 2: Exclude unrelated reasonsBatching speed, S3 uploads, and Elasticsearch indexing are unrelated to primary key usage in JDBC sink.Final Answer:To perform upserts and avoid duplicate rows -> Option AQuick Check:Primary key needed for upserts in JDBC sink [OK]Quick Trick: Primary key enables upserts in JDBC sink connector [OK]Common Mistakes:MISTAKESThinking primary key speeds transferConfusing JDBC sink with S3 or ES functions
Master "Connect" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Kafka Connect - Kafka Connect architecture - Quiz 10hard Kafka Connect - Transform and converter chains - Quiz 3easy Kafka Connect - Standalone vs distributed mode - Quiz 15hard Kafka Streams - Windowed operations - Quiz 3easy Kafka Streams - Windowed operations - Quiz 9hard Kafka with Java/Python - Configuration best practices - Quiz 6medium Kafka with Java/Python - Python consumer - Quiz 1easy Kafka with Java/Python - Client metrics monitoring - Quiz 5medium Message Delivery Semantics - At-least-once delivery - Quiz 2easy Monitoring and Operations - Why monitoring prevents outages - Quiz 9hard