Urgent.News

What's breaking now, across thousands of outlets.

Tech

What Happens When the Import Fails Halfway?

On a Tuesday morning in March, the warehouse supervisor at a manufacturing customer called me. Not a ticket. Not an email. A phone call, which in our world means something is on fire. She had spent two weeks preparing the migration of eleven years of inventory records. Twelve thousand rows, cleaned by hand, in a spreadsheet her team had guarded like a religious document. The import had run. The…

On a Tuesday morning in March, the warehouse supervisor at a manufacturing customer called me. She had just completed a migration of eleven years' worth of inventory records, a painstaking two weeks of manual work. The platform displayed a seemingly successful import, but nine hundred rows were found to be in error. Dates had incorrectly changed formats, certain rows were skipped without explanation, and the same three suppliers appeared four times. This customer was understandably frustrated with the deceptive nature of the import feature.

I learned that import is not a feature, but rather a contract. Import appears as a checkbox in feature matrices, alongside other superficial functionalities. However, the reality is far more complex. The import process involves parsing, validating, transforming, matching against existing records, deduplicating, committing to the database, and reporting. Each stage can fail, and they can fail in distinct ways. The progress bar and successful message in the checkbox fail to communicate these intricate steps.

Most platforms, including mine, treat the middle of this pipeline as an implementation detail, which is counterproductive. The first design decision should focus on the failure semantics of the import process. Should the system commit everything, nothing, or only the rows that succeeded? All-or-nothing is straightforward but harsh.

Best-effort is more forgiving but risks burying failures in downloadable logs and quietly corrupting data models. The optimal approach is staged validation, showing the customer exactly what would happen before committing any changes.

The most valuable feature, however, is often overlooked: preview. A dry-run mode allows customers to see the exact impact of an import without actually executing it. This feature transforms the import process from a gamble into a negotiation, enabling customers to identify and address edge cases before they become permanent mistakes. Preview also clarifies matching issues, allowing customers to decide whether to consider variations in supplier names as the same entity.

As file sizes grow, imports become asynchronous jobs with their own lifecycle. Support tickets not only decrease but also shift from reactive troubleshooting to proactive problem-solving. Import becomes a document that customers can review, understand, and negotiate. The lesson is clear: batch operations that outlive an HTTP request require a job-like design, complete with status pages, progress tracking, cancellation capabilities, and idempotency.

Exports, often perceived as the gentle sibling of import, share similar challenges. They are merely a query with a download button, and numerous failure modes can arise. Large exports may time out, stream exports consume database connections, and filtered view exports compete with concurrent edits. The customer's exported file becomes a snapshot that can be stored in various unauthorized locations, posing risks to data integrity and security.

Encoding issues also plague exports, as customers may encounter unreadable characters due to incorrect code page settings in their office computers.

In conclusion, the true essence of import and export lies in meticulous planning, robust validation, transparent communication, and robust job management. Neglecting any of these aspects leads to incomplete contracts, hidden failures, and customer dissatisfaction. By embracing a staged validation approach, offering comprehensive previews, and designing imports and exports as self-contained jobs, platforms can significantly enhance the user experience and foster trust with their customers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Python for Java Developers: A Complete Bridge Guide

Python for Java Developers: A Complete Bridge Guide You're a 10-year Java veteran. Now you need to learn Python. Here's how to use your Java knowledge. Mental Model Shifts 1.

  • Python is dynamically typed, while Java is statically typed
  • Python uses indentation for code blocks, unlike Java's braces
  • Both languages treat functions, classes, and modules as objects

BDD where it earns its place, and nowhere else

I have a slightly complicated relationship with BDD. I've watched it turn a tangled test suite into something the whole team could read and reason about, and I've watched it turn a perfectly good unit…

  • BDD introduced to go-tool-base via Cucumber-style tools
  • Strategic use of BDD improves pkg/controls package tests
  • CLI commands benefit from BDD readability with Godog

Elasticsearch vs OpenSearch: Enterprise Search Comparison 2026

Elasticsearch vs OpenSearch: Enterprise Search Comparison 2026 You need enterprise search. Elasticsearch dominates the market, but OpenSearch offers compelling alternatives in 2026.

  • Elasticsearch leads market with mature ecosystem and extensive support
  • OpenSearch offers cost-effective open-source alternative with growing community
  • Elasticsearch excels in ML capabilities, OpenSearch limited in ML

More from Friday 2 October →