Quick revision
The short answer
I would not try to replace CSV everywhere, because it survives for good reasons: every partner's tools, including spreadsheets, can produce it, and most partners have no capacity to change. I would invest in two places instead: move the few large, high-volume partners to APIs or schema-based formats with contracts, and for the long tail make CSV itself safe, with a published specification per feed and one shared ingestion platform that validates, quarantines and tells partners exactly what is wrong. Incident counts and onboarding time per partner justify the spend and show whether it works.
What to remember
In this answer, we saw that CSV persists because every tool supports it and partners have little capacity to change, and that most incidents come from missing contracts, inconsistent parsing and late validation rather than from CSV itself. We split the investment into two tracks: APIs or schema formats with contracts for the few high-leverage partners, and a published CSV profile per feed with one shared ingestion platform for the long tail. We tied both to incident counts and onboarding time, reported quarterly.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would not try to replace CSV everywhere, because it survives for good reasons: every partner's tools, including spreadsheets, can produce it, and most partners have no capacity to change. I would invest in two places instead: move the few large, high-volume partners to APIs or schema-based formats with contracts, and for the long tail make CSV itself safe, with a published specification per feed and one shared ingestion platform that validates, quarantines and tells partners exactly what is wrong. Incident counts and onboarding time per partner justify the spend and show whether it works.
Why this question is asked
Data exchange with partners is one of those areas where the technically best answer, "everyone should send us validated JSON over an API", meets reality: hundreds of organisations with their own systems, budgets and priorities. A senior technical leader has to decide where investment changes outcomes and where it only creates friction. Interviewers ask this question to hear that judgement: understanding why the status quo persists, segmenting the problem, and choosing measures that make the business case. In this answer, we will look at why CSV persists, find the real causes of the incidents, segment partners by leverage, design the two tracks, the migration of large partners and a safe CSV standard with a shared platform, and finish with how to measure and fund it.
1Why CSV Persists
CSV is the lowest common denominator of data exchange. Every ERP, every database tool and every spreadsheet can export it, a business analyst can open it to check a file, and a small partner can produce it without a developer. For a partner with one part-time IT person, "build an integration against our API" is a project they may never schedule, while "send us a CSV every night" is something they can do today.
So the persistence of CSV is not a failure of our engineering; it is a rational choice by our partners. A plan that ignores that will be ignored back. The useful question is not "how do we get rid of CSV?" but "why does CSV cause incidents, and which of those causes can we remove?"
2Finding the Real Causes of the Incidents
Before deciding anything, I would look at the last year of incidents and classify them. In most companies the same few causes dominate: no agreed specification, so each partner's file is interpreted by whoever wrote the parser; hand-written parsers with split-based bugs that break on quoted commas or line breaks; charset confusion between Windows-1252 and UTF-8; partners silently adding, renaming or reordering columns; and bad rows that only fail deep in downstream systems, days later, where they are expensive to trace.
Notice that almost none of these are caused by CSV as a syntax. They are caused by the absence of a contract, inconsistent parsing and late validation. That matters, because those can all be fixed without asking partners to change format.
3Segmenting Partners by Leverage
Partners are not equal. Typically a small number carries most of the volume: in a company with 300 partners, perhaps 20 send 80% of the rows and cause a large share of the business impact when a feed breaks. Those partners usually have engineering teams, and an API or a schema format gives them and us real benefits. The long tail of small partners sends small files, cannot easily change, and needs the safe CSV path.
| Partner segment | Typical count | Target exchange |
|---|---|---|
| Large, technical, high volume | about 20 of 300 | API with JSON Schema or OpenAPI, or Avro/Parquet files |
| Medium, some IT capacity | about 60 | CSV with strict profile; offer API as an option |
| Small, spreadsheet-based | about 220 | CSV profile, upload portal with instant feedback |
4Track One: Move the High-Leverage Partners to Contracts
For the large partners, I would offer an API with a published schema, or for bulk data a schema format such as Avro or Parquet, which carry types and column names inside the file. Each integration gets a versioned contract, contract tests on our side, and a deprecation policy, so a change is negotiated instead of discovered. We make it attractive rather than mandatory: faster settlement, real-time status, fewer support tickets for them. Each migration is a small project with a named owner on both sides, and we sequence them by impact, the partners behind the most incidents first.
This track will not reach most partners by count, and it does not need to. If 20 partners carry 80% of the volume, moving them removes most of the risk by value.
5Track Two: Make CSV Itself Safe With a Profile and a Shared Platform
For everyone else, we standardise the CSV instead of replacing it. Each feed gets a published profile: charset (UTF-8), delimiter, quoting per RFC 4180, exact header names, column types and formats, required and optional fields, validation rules, and sample files that pass and fail. The profile is versioned like an API.
Then we replace the per-team parsers with one shared ingestion platform. Every file enters through it. It parses with a proper CSV library, validates against the feed's profile, quarantines files or rows that fail, and sends the partner a clear error report: line 1,204, column amount, "12,50" is not a valid number, use a dot as the decimal separator. Downstream systems receive only validated, typed data. Monitoring shows, per partner and per feed, files received, rows rejected and late files.
- Partner upload: portal, SFTP or APIone entry point for every file
- Profile checkcharset, headers, column count, file version
- Row validationtypes, formats, business rules from the profile
- Quarantine and partner error reportline numbers and plain reasons
- Typed data to internal systemsnobody downstream parses CSV again
- Monitoring per partner and feedrejection rates, missing or late files
6 layers, from the top down. Step through them one at a time.
The shift is that errors are caught at the door, within minutes, and explained to the person who can fix them, instead of surfacing days later in finance. Many incidents disappear simply because the partner sees the error report and corrects the file the same day.
6Measuring and Funding the Investment
To justify the platform and the migrations, I would establish a baseline: data quality incidents per quarter and their cost in engineering and business time, time to onboard a new partner (often several weeks with custom parsing), and the number of parsers the company maintains. Suppose we see 40 incidents a quarter, each costing two to three engineer-days, and six weeks to onboard a partner. The platform's business case is then concrete: if it halves incidents and brings onboarding down to one week, it pays for its team within a year.
I would then report the same numbers quarterly, by track, so leadership sees what each part of the investment delivers. If track two removes most incidents, we may slow track one; if large partners still dominate the incidents, we accelerate their migration. The investment stays tied to outcomes instead of to a format preference.
- Does the partner carry high volume or impact?Yestrack one: API or schema format with contractNogo on
- Does the partner have engineering capacity?Yesoffer the API; accept the CSV profile meanwhileNotrack two: CSV profile
- Onboard through the shared ingestion platformevery path is validated at the door
- Review incidents and onboarding time quarterlyrebalance the two tracks
4 steps in order. Play them, or step through them one at a time.
7Follow-up questions
Why not mandate the API for all partners by a deadline?
Because the small partners cannot meet it, and the business will not cut them off, so the deadline slips and the mandate loses credibility. Offering the API, and making the CSV path strict but well supported, gets most of the safety without that fight.
Who owns the CSV profiles?
The team that owns each feed's data writes its profile, with the platform team providing the format and tooling. The profile is reviewed like an API change, and partners are told about new versions in advance with sample files.
What is the first step you would take?
Classify the last year of incidents and volumes by partner. That one analysis tells us where the risk is concentrated, which partners belong in each track, and what baseline we will measure against.
8Conclusion
In this answer, we saw that CSV persists because every tool supports it and partners have little capacity to change, and that most incidents come from missing contracts, inconsistent parsing and late validation rather than from CSV itself. We split the investment into two tracks: APIs or schema formats with contracts for the few high-leverage partners, and a published CSV profile per feed with one shared ingestion platform for the long tail. We tied both to incident counts and onboarding time, reported quarterly.
Open with
I would not try to eliminate CSV, because it persists for a reason: every partner's system and every spreadsheet can produce it, and many partners have no developers to build an integration.
Then, if they want more
If we mandate a change, the small partners cannot follow and the mandate fails. So I would start by analysing a year of incidents and volumes.
Usually the causes are not the CSV syntax but the lack of a contract, a dozen different hand-written parsers, charset confusion, partners changing columns without warning, and bad rows that are only caught deep downstream. Then I would run two tracks.
For the small number of high-volume partners, often twenty or so carrying most of the data, I would move them to APIs or schema-based files like Avro or Parquet with versioned contracts and contract tests, and make it attractive for them.
For the long tail, I would make CSV safe: a published profile per feed with charset, delimiter, headers, types, rules and sample files, and one shared ingestion platform that every file goes through, which validates, quarantines bad files or rows, and sends the partner a precise error report with line numbers. Downstream systems only get typed, validated data.
To justify and steer it, I would track incidents per quarter, their cost, and onboarding time per partner, and rebalance the two tracks based on what those numbers show.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- The Java Language Specification, Java SE 21, Java SE 21 API documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "CSV files remain the main way your company exchanges data with hundreds of partners...": https://scrivio-interview-library.netlify.app/java/io-and-nio/652656c0df/