Data Ingestion and Source System Integration Questions
Getting data out of heterogeneous source systems and landing it reliably: APIs, operational databases, file drops, webhooks, message queues and third-party SaaS. Covers connector selection and design (managed platforms versus Debezium, DMS or Kafka Connect versus building your own), pull versus push and polling versus webhook patterns, incremental extraction and high-watermark strategy including what to do when a source offers no native change capture, authentication and credential rotation against third-party APIs, source-side rate limits and quotas, schema drift and contract breakage at the source boundary, backfill and replay of history, ingestion-time data-quality gates, reconciliation after a source outage, and negotiating with source-system owners. The scope stops at the boundary: once data has landed, transforming it, the architecture of the pipeline that carries it, stream-processing mechanics, and pipeline monitoring are all covered separately.
An upstream partner changed a field's format without telling you, and your warehouse loads started failing quietly, because some rows still happened to parse. How would you design ingestion so a change like this is caught early, traced back to the specific source, and rolled out safely to downstream consumers rather than silently corrupting data?
Sample Answer
Direct answer
The failure here is that a format change was invisible because the old parser tolerated it well enough to keep running, just on wrong data. The fix has two halves: catch it fast with contract validation that actively checks the SHAPE of incoming data against what you expect rather than passively accepting whatever parses, and design the rollout of any downstream fix so a corrected pipeline does not need to guess which rows were affected.
Structured elaboration
Catching it early: validate the contract, not just the parse
- A field "parsing" is a much weaker guarantee than a field having the RIGHT type, format, or range; a date field that silently starts arriving as
MM/DD/YYYYinstead ofYYYY-MM-DDwill often still parse as a string while producing garbage downstream. - Run schema and value-shape checks at ingestion time: expected field presence, type, and a sanity check on value ranges or patterns, not merely "did JSON.parse succeed."
- A schema registry with enforced compatibility rules (for structured formats like Avro or Protobuf) rejects an incompatible producer change at write time rather than letting it through to be discovered downstream.
- For less structured sources (a partner's CSV or JSON feed with no registry), a lightweight contract test run against a small sample of every batch, before the full batch loads, catches the same class of problem.
Tracing it back to the specific source
- Every ingested record should carry provenance: which source, which connector version, and roughly when it was captured, so an anomaly can be traced back without guessing which of several sources is responsible.
- When a validation check fails, the alert should name the specific field, the specific source, and a sample of the offending records, not just "a data quality check failed somewhere."
Rolling the fix out safely
- Quarantine newly-arriving bad records rather than either blocking the whole pipeline or silently loading them; this buys time to fix the parser without an outright ingestion outage.
- Once a fix ships, replay the quarantined records through the corrected logic rather than asking downstream consumers to somehow know which historical rows were affected.
- Coordinate the rollout with the source-owning team if you have any relationship with them: even an informal heads-up channel materially shortens how long a format drift goes undetected the next time.
Worked example
A partner feed silently starts sending "1,234.50" (a thousands separator and no currency symbol) instead of the previously-agreed "1234.50" for an amount field. The old parser calls float() on the string, which raises on the comma, but the code catches that exception and defaults to 0.0 rather than failing loudly, so rows keep flowing with silently zeroed amounts. A contract check that asserts "amount is a positive number above some plausible floor for this source" would have caught the very first batch, because a wave of exact 0.0 values is an obvious outlier the moment it is checked, rather than a value that happens to parse. Once caught, the fix is to correct the parser to strip thousands separators, quarantine and reprocess the affected window of already-ingested rows from the raw landing copy (never from the already-corrupted downstream table), and add an explicit test fixture using this exact malformed string so the same regression cannot silently reappear.
Trade-offs & pitfalls
- A defensive
try/exceptaround parsing that silently defaults to a "safe-looking" value (0, null, an empty string) is precisely how this defect hides; a catch block should always increment a visible counter or emit a quarantine record, never both catch AND stay silent. - Blocking the entire pipeline on any validation failure is not always right either: for a high-volume source, a small fraction of malformed rows quarantined with an alert is usually better than an outright halt, provided someone is actually watching the quarantine.
- Keep the raw, unparsed landing copy of every batch for at least as long as your reprocessing window; without it, "replay the corrected fix" is impossible once the source's own retention window has passed.
- Over-tight contract checks are their own failure mode: a validation rule so strict it rejects a legitimate but unusual value (a genuine large transaction, for example) just creates a different kind of silent data loss inside the quarantine queue if nobody reviews it.
Design the integration layer for a company with 25 internal applications and 8 external vendors that all share customer, product, and order data. Requirements: one place to manage ownership, support for both near-real-time and batch sync, lineage you can use for audits, and minimizing point-to-point connections between systems. How would you structure the data flow and the integration boundaries?
Sample Answer
Direct answer
The way to avoid 25 x 8 point-to-point connections is a hub-shaped integration layer: every internal application and external vendor connects to ONE shared layer, not to each other directly, and that shared layer owns the canonical model, the sync mechanics, and the lineage, while individual systems only need to know how to talk to the hub.
Structured elaboration
Structuring the data flow
- A central integration layer (built on an event bus plus a set of connectors, or an iPaaS-style platform (integration platform as a service: a vendor-hosted product that ships pre-built connectors and a workflow engine so you configure integrations rather than code them from scratch), depending on scale and budget) sits between every system; a system publishes changes to the hub and consumes what it needs from the hub, never directly from another system's database or API.
- Define a canonical data model for the shared entities (customer, product, order) that every system's data is mapped into on the way in and mapped out of on the way out, so the hub, not each pairwise connection, absorbs the complexity of reconciling different systems' representations of the same entity.
Ownership
- Each canonical entity has one clearly designated owning system (the source of truth for that entity), with every other system treated as a consumer or, where genuinely necessary, a secondary contributor with an explicit conflict-resolution rule.
- The integration layer itself owns the mapping rules and the sync mechanics, but not the business data; ownership of "what is correct" stays with the source systems, ownership of "how it moves" belongs to the integration layer.
Supporting both near-real-time and batch sync
- Systems that can emit events (most modern internal apps, some vendors) integrate via the event bus for near-real-time propagation.
- Systems that cannot (older internal apps, vendors offering only file exports or low-frequency APIs) integrate via scheduled batch connectors into the same hub, landing into the same canonical model on their own cadence.
- The consuming side does not need to know or care which mechanism produced an update; it reads from the hub's canonical store either way.
Lineage for audits
- Every record moving through the hub carries provenance: which source system it came from, when it was captured, and which mapping rule transformed it into the canonical shape.
- Centralizing this in the hub, rather than expecting each of the 33 systems to independently implement its own audit logging, is what makes a company-wide audit actually answerable in one place instead of 33 separate investigations.
Minimizing point-to-point connections
- Every pair of systems that needs to exchange data would need its own direct connection without a hub; the number of possible pairs among N systems is written C(N,2) (read "N choose 2") and works out to N x (N-1) / 2, since each of the N systems can pair with N-1 others and dividing by 2 removes the double-count of listing each pair twice (once from each system's own perspective). Without a hub, the theoretical maximum of pairwise integrations among all 33 systems, since the question states all three data types are shared broadly rather than only flowing from vendor to internal app, is C(33,2) = 33 x 32 / 2 = 528, not just the 25 x 8 = 200 cross-group (internal-to-vendor) pairs alone: internal-to-internal sharing among the 25 apps adds up to C(25,2) = 300 more possible pairs, and vendor-to-vendor sharing among the 8 vendors adds up to C(8,2) = 28 more. The hub collapses all of that, cross-group and within-group alike, down to 33 connections total (one per system, in and out of the hub), which is the entire point of centralizing rather than letting teams integrate pairwise as needs arise.
- New systems joining later (a 26th internal app, a 9th vendor) need only ONE new connection to the hub, not a new connection to every existing system they might need data from.
Worked example
A new CRM vendor is being onboarded as external vendor #9. Without the hub, onboarding it would mean building point-to-point integrations to however many of the 33 other systems need customer data from it, potentially dozens of new connections. With the hub, the CRM vendor gets exactly one connector mapping its customer records into the canonical customer model, publishing changes to the hub; every one of the other 32 systems that already consumes canonical customer data from the hub automatically sees the new vendor's data with zero changes on their end, since they were never coupled to any specific source system in the first place, only to the hub's canonical shape.
Trade-offs & pitfalls
- A canonical data model is genuine, ongoing modeling work, not a one-time exercise; as new systems join with data that does not map cleanly onto the existing canonical shape, the model itself has to evolve, and that evolution needs the same schema-change discipline as any other shared contract.
- Centralizing everything into one hub creates a single dependency every system now relies on; the hub's own availability and scaling become critical-path concerns in a way that no single point-to-point connection ever was on its own.
- Not every legacy vendor will cleanly fit the hub pattern; some very old or inflexible systems may need a bespoke adapter in front of them just to get their data into a shape the hub can accept at all, and pretending otherwise just pushes the complexity into a fragile, undocumented corner.
- "One connection per system" is the right target, but it is easy to accidentally recreate point-to-point sprawl inside the hub itself if teams start building direct, hub-bypassing shortcuts "just this once" for a deadline; governance over the hub's own boundary matters as much as the initial architecture.
Compare Kafka Connect, AWS DMS, and Debezium as connector technologies for moving data out of a source system. For each, discuss the sources and targets it supports, its operational model, latency characteristics, and how it handles schema changes, and name a scenario where you would prefer each one.
Sample Answer
Direct answer
Kafka Connect is a connector framework, not a connector itself: it gives you a plugin runtime, offset management, and a scaling model, but you still choose a source connector (JDBC, Debezium, or a vendor plugin) to run inside it. Debezium is a log-based change-data-capture connector, most often deployed as a Kafka Connect source plugin, that reads a database's transaction log directly. AWS DMS (Database Migration Service) is a managed, standalone replication service that does its own log reading and its own delivery, with no dependency on Kafka at all. The practical choice usually comes down to whether you are already committed to Kafka as your transport, how much operational ownership you want, and whether the source and target are both natively supported by a managed service.
Structured elaboration
Kafka Connect (the framework)
- Sources and targets: whatever plugin you install; huge open-source and commercial ecosystem (JDBC, Debezium, S3, Elasticsearch, Snowflake sinks, and more).
- Operational model: you run and scale Connect workers yourself (or use a managed flavor like Confluent Cloud or MSK Connect); connectors are configured via a REST API and distribute their work as tasks across workers.
- Latency: near-real-time when paired with a log-based source connector like Debezium; can be batch-like (minutes) with a JDBC polling connector.
- Schema handling: integrates with a schema registry; Single Message Transforms (SMTs) let you reshape, mask, or route records in-flight without writing custom code, for example dropping a field or renaming a topic based on the source table.
Debezium (a log-based CDC connector, usually run inside Kafka Connect)
- Sources: MySQL, PostgreSQL, MongoDB, SQL Server, Oracle, and others, reading each database's native change log (binlog, write-ahead log or WAL, oplog).
- Targets: Kafka topics (one per captured table by default); further delivery from there is a separate sink connector's job.
- Operational model: you run it, typically as a Kafka Connect source connector; it needs log-retention and permissions on the source database, and captures deletes and DDL, not just row values.
- Latency: sub-second to low-second, because it tails the log rather than polling.
- Schema handling: emits schema-aware records (with before/after state) and can be paired with a schema registry; DDL changes on the source generate corresponding schema evolution events.
AWS DMS (a managed, standalone replication service)
- Sources and targets: a fixed, broad matrix of relational and NoSQL engines on both ends (Oracle, SQL Server, PostgreSQL, MySQL, DynamoDB, S3, Redshift, and more), configured declaratively rather than through a plugin ecosystem.
- Operational model: fully managed by AWS; you configure a replication instance and endpoints and it handles the full-load-plus-CDC lifecycle, including the initial snapshot, without you standing up any infrastructure.
- Latency: log-based CDC once the initial load completes, comparable to Debezium; the initial full load is a separate, often slower phase.
- Schema handling: less flexible in-flight transformation than Kafka Connect SMTs; schema changes on the source can require re-running or reconfiguring a task rather than being absorbed automatically.
When you would prefer each
- Prefer Kafka Connect + Debezium when Kafka is already your transport of record and you want every downstream consumer, not just one target, to see the change stream, or when you need in-flight transformation via SMTs.
- Prefer AWS DMS when you are moving data between two AWS-native or classic relational engines and do not want to operate any connector infrastructure yourself, especially for a one-time or few-target migration rather than a fan-out to many consumers.
- Prefer Kafka Connect with a non-CDC plugin (JDBC source, a vendor-published connector, a sink connector) when the source has no usable log access at all and you are accepting timestamp-based polling instead.
Worked example
A team is migrating change events from an on-prem PostgreSQL order-processing database so three different services (fraud detection, analytics, and a search index) can each consume the same stream independently. Because there are three independent downstream consumers, not one target, Kafka Connect with Debezium is the right shape: Debezium publishes one topic per table, and each service runs its own consumer group against those topics with no coupling to the others. If instead the requirement had been "replicate this same database into an RDS PostgreSQL replica for read scaling, one source, one target," AWS DMS would have been the simpler, lower-operational-cost choice, since there is nothing to fan out and no need to run Connect infrastructure at all.
Trade-offs & pitfalls
- Debezium needs enough log retention on the source (binlog expiry, WAL retention) to survive a connector outage without falling behind and being forced into a full re-snapshot; this is an easy production surprise if nobody sizes it.
- Kafka Connect's flexibility is also its operational cost: you own worker sizing, connector upgrades, and dead-letter handling for bad records, none of which AWS DMS asks of you.
- AWS DMS's schema-change story is the sharpest limitation: adding or renaming a column mid-flight is not something it absorbs gracefully the way a schema-registry-backed Debezium pipeline can.
- Do not conflate "Kafka Connect" and "Debezium": Connect is the runtime, Debezium is one of many possible connectors you can run inside it, and mixing them up in an interview answer signals you have not actually operated either.
Walk through the trade-offs between using a managed connector platform (for example Fivetran or Stitch) and building a custom connector for a source system. Cover maintenance burden, SLA guarantees, feature flexibility, observability, cost, security, and how quickly you can onboard a new source with each option.
Sample Answer
Direct answer
A managed connector platform trades money and some flexibility for speed and reduced operational ownership: you get a source live in hours, someone else watches it for schema drift and API changes, and you pay per row or per connector. A custom-built connector trades that speed for control: you can implement exactly the extraction semantics, retry policy, and enrichment your source needs, at the cost of building and then owning that code forever. The decision usually turns on how standard the source is, how differentiated your requirements are, and whether the team has the bandwidth to be a long-term connector maintainer.
Structured elaboration
When a managed platform wins
- The source is a common, well-supported SaaS system (a CRM, an ad platform, a payment processor); the vendor has almost certainly already solved pagination, rate limits, and incremental sync for it.
- Time-to-value matters more than customization: a managed connector can often be live same-day, versus days or weeks to build and test a custom one.
- The team does not want to be paged when the vendor changes an API version; that becomes the platform's problem, covered by their service-level agreement (SLA).
- Observability is built in (sync history, row counts, failure alerts) rather than something you instrument yourself.
When building your own wins
- The source is proprietary, internal, or unusual enough that no vendor supports it.
- You need extraction logic a generic connector cannot express: a specific incremental key, in-flight enrichment, or a non-standard authentication flow.
- Per-row or per-connector pricing becomes expensive at your volume, and you have the engineering capacity to absorb the ongoing maintenance cost instead.
- You need tighter control over exactly when and how retries happen, for example to coordinate with a downstream system's own rate limits.
Security
- A managed platform holds your source credentials (API keys, OAuth tokens) inside its own infrastructure: you are trusting its security posture, breach history, and compliance certifications (SOC 2, ISO 27001) rather than controlling storage yourself, and a breach on the vendor's side can expose every customer's credentials at once, not just yours.
- A custom connector puts credential storage and rotation entirely in your own hands: you control exactly where secrets live and who can access them, but you also own getting it right, and a quickly-built connector with a hardcoded API key or an over-scoped database user is a common, self-inflicted vulnerability.
- Vendor access is itself a security surface worth evaluating: a managed platform typically needs broad read access to the source system to support every customer's use case, so check what scope it actually requests, not just whether the connection to it is encrypted.
What "total cost of ownership" actually includes
- Managed: subscription or usage-based fees, which usually scale with data volume or row count and can become the dominant line item as you grow.
- Custom: engineer time to build, test, and then maintain the connector indefinitely, including reacting every time the source's API changes, which the vendor would otherwise absorb for you.
- Both: someone has to own incident response when the sync silently stops; a managed platform's SLA defines a target for how fast THEY notice and fix it, while a custom connector's on-call rotation is your own.
Worked example
A 40-person startup needs to pull from Salesforce, Stripe, and a home-grown inventory service into its warehouse. Salesforce and Stripe are both extremely well-trodden managed-connector sources with mature incremental-sync support, so building custom connectors for those two would mostly be reinventing pagination and rate-limit handling the vendor already solved; a managed platform is the clear choice there. The inventory service has no public connector because it is internal, so there is no "managed" option to compare against: it has to be a custom connector regardless of preference. The decision is not really "managed versus custom" as a blanket policy, it is a per-source decision, and most real integration platforms end up as a mix of both.
Trade-offs & pitfalls
- Vendor lock-in is real: switching platforms later means re-validating every connector's field mappings and historical sync behavior, not just flipping a config flag.
- A managed connector's incremental-sync logic is usually a black box; when a sync silently drops rows, you are debugging through the vendor's support queue rather than reading your own code.
- Building custom "to save money" without counting the ongoing maintenance burden is a common and expensive mistake: the true cost is the sum of every future hour spent reacting to the source's API changes, not just the initial build.
- Watch for hidden coupling: a custom connector built by one engineer who then leaves becomes an unmaintained single point of failure faster than most teams expect.
Describe how you would secure ingestion pipelines that span multiple cloud services and on-prem sources. Cover authentication and authorization for connectors (mTLS, IAM roles, service accounts), encryption at rest and in transit, secret management, auditing, and how you enforce least privilege for producers and consumers on both sides of a connector.
Sample Answer
Direct answer
Securing an ingestion pipeline that spans multiple clouds and on-prem sources means treating every connector as a distinct trust boundary: authenticate it with the strongest mechanism the source and target both support, encrypt data both in transit and at rest, keep every secret in a managed secrets store with rotation, log enough to reconstruct who touched what and when, and grant each connector only the specific permissions it needs, never a broad standing credential.
Structured elaboration
Authentication and authorization
- Prefer mutual TLS (mTLS) for connector-to-connector traffic where both ends support it, since it authenticates both parties, not just the client to the server.
- Use cloud-native IAM (Identity and Access Management) roles or service accounts for connectors talking to a cloud provider's own services, rather than long-lived static keys; a role can be scoped narrowly and its usage is natively auditable.
- For on-prem sources with neither mTLS nor cloud IAM available, a short-lived, narrowly-scoped service account credential is the fallback, still avoiding a single shared "integration user" account used by every connector.
Encryption
- In transit: TLS for every hop, including internal ones between a connector and an internal message bus; do not assume "internal network" means encryption is unnecessary.
- At rest: envelope encryption via a key management service (KMS), so data is encrypted with a data key that is itself encrypted by a master key the KMS controls, giving you centralized key rotation and revocation without re-encrypting all your data on every rotation.
Secret management
- Every credential, API key, database password, and certificate lives in a secrets manager, never in connector configuration files, environment variables checked into source control, or container images.
- Automate rotation where the source supports it; where it does not, at minimum track credential age and alert on staleness so rotation happens on a schedule rather than never.
Auditing
- Log every authentication event, every credential access, and every connector's data-access pattern (which source, how much data, when) in a way that is queryable after the fact, not just written to an ephemeral log that rotates away in days.
- Treat audit logs as themselves sensitive: they can reveal a lot about your data flows and access patterns, so restrict who can read them.
Least privilege for producers and consumers
- A connector reading from a source should have read-only access to exactly the tables, topics, or endpoints it needs, never blanket access to the whole source system.
- A connector writing to a target should be scoped to write only to its designated landing location, not broad write access across the destination platform.
- Review these scopes periodically; connector permissions tend to accumulate over time as requirements evolve, and nobody circles back to remove access that is no longer needed.
Worked example
A connector reads from an on-prem PostgreSQL database (via a VPN tunnel with TLS) and writes to a cloud data warehouse. The read side authenticates with a database service account scoped to SELECT on exactly the three tables the connector needs, credentials stored in the cloud secrets manager and fetched at connector startup rather than baked into its container image. The write side authenticates via a cloud IAM role scoped to write only into the specific landing schema this connector owns, with no access to any other team's tables. Both the credential fetch and every batch write are logged with a timestamp, source, and row count, so a security review six months later can answer "what did this connector actually access and when" without needing to reconstruct it from memory.
Trade-offs & pitfalls
- The most common real-world shortcut is a single shared "integration" database user with broad access used by every connector "to keep things simple"; this collapses your entire audit trail (you cannot tell which connector did what) and turns one leaked credential into access to everything.
- mTLS is not always available on legacy on-prem systems; do not let its absence become an excuse to skip TLS entirely, a one-way TLS connection is still meaningfully better than plaintext.
- Rotating secrets automatically is only safe if the connector can pick up a rotated credential without a manual restart; verify this before relying on automated rotation, or a rotation event becomes an unplanned outage.
- Least-privilege scopes decay over time as requirements shift; without a periodic review, "least privilege at launch" quietly becomes "broad privilege nobody remembers granting" within a year or two.
Unlock Full Question Bank
Get access to all 12 Data Ingestion and Source System Integration interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.