Data capture, which is TDC. Only inserts, updates, deletes need to be written into Snowflake. Can you come up with a pipeline that will help us do this?
1Times asked
Jun 2026Last seen
Jun 2026First seen
💡 Model Answer
A robust pipeline for CDC to Snowflake would consist of the following components:
- Source CDC – Use AWS Database Migration Service (DMS) or a custom Lambda that listens to DynamoDB Streams or RDS binlogs to capture INSERT, UPDATE, DELETE events. DMS can output changes in JSON.
- Transport Layer – Push the CDC records to Amazon Kinesis Data Streams or SQS for decoupling and buffering. Kinesis gives you fine‑grained scaling and replay.
- Transformation – Run a Glue job or Lambda that reads from Kinesis, normalizes the JSON, and writes to an S3 landing bucket in Parquet or CSV. Include a timestamp and operation type.
- Snowflake Ingestion – Configure Snowpipe to monitor the S3 bucket. Snowpipe automatically loads new files into a staging table. Use a Snowflake stream on the staging table to detect new rows.
- Incremental Load – Merge the staging table into the target fact table using a MERGE statement that handles INSERT, UPDATE, DELETE based on the operation flag. This keeps the target table up‑to‑date.
- Monitoring & Error Handling – Use CloudWatch for Kinesis/Lambda metrics, set up alerts for failures, and implement a dead‑letter queue for problematic records.
Complexity: The pipeline is largely event‑driven, so latency is low (seconds to minutes). Cost scales with data volume and the number of shards in Kinesis. The design is fault‑tolerant and can be extended to support additional targets.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500