Bird
Raised Fist0

Why does the Kafka JDBC sink connector require a primary key or unique identifier in the target table?

hard🧠 Conceptual Q10 of Q15
Kafka - Connect
Why does the Kafka JDBC sink connector require a primary key or unique identifier in the target table?
ATo perform upserts and avoid duplicate rows
BTo speed up data transfer by batching
CTo enable file uploads to S3
DTo index data in Elasticsearch
Step-by-Step Solution
Solution:
  1. Step 1: Understand JDBC sink behavior

    The sink connector uses primary keys to identify rows for updates or inserts (upserts).
  2. Step 2: Exclude unrelated reasons

    Batching speed, S3 uploads, and Elasticsearch indexing are unrelated to primary key usage in JDBC sink.
  3. Final Answer:

    To perform upserts and avoid duplicate rows -> Option A
  4. Quick Check:

    Primary key needed for upserts in JDBC sink [OK]
Quick Trick: Primary key enables upserts in JDBC sink connector [OK]
Common Mistakes:
MISTAKES
  • Thinking primary key speeds transfer
  • Confusing JDBC sink with S3 or ES functions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes