Skip to content
RegisterBench

W1-809 - CSV formatting problem in a data file (Additional Plain-csv)

ESA technical check 809: every csv row must parse; a value containing a comma, CR, LF or a double quote must be enclosed in double quotes (footnote 26).

Layer
W1a
Category
Additional Plain-csv
Severity
blocking
Taxonomy version
eba-4.0-errata5

Last reviewed:

Content last changed:

Official control text (EBA, verbatim)

CSV formatting problem detected

Comment in the EBA artifact (verbatim):

New check.
This rule is necessary to control the parsing of the csv rows in the file. Otherwise, if some tables cannot be integrated for this issue many foreign keys will fail with 807.  Without this new rule, it is hard for the submitters to understand the reason for the 807 if the target table file could not be integrated in the first place.

What this rule checks

The check controls the parsing of the csv rows in a data file: a row that does not parse into the columns of its header is a csv formatting problem, and the file cannot be integrated. The quoting convention is fixed by the filing rules (measured quote, FR v5.5, p. 58, footnote 26): "if a string contains a comma, carriage return, linefeed or double quote symbol, then the sting value must be enclosed in double quotes" (the typo "sting" is verbatim in the filing rules).

The artifact comment states the intent of the new check: without 809, a table that could not be integrated would surface only as a wall of foreign-key failures under 807, and it would be hard for submitters to understand the reason. 809 names the real, earlier problem: the file itself did not parse.

In RegisterBench the on-wire csv syntax has one definition (class EsaCsvFormat): a value containing one of the four footnote-26 characters (comma, carriage return, linefeed, double quote) is enclosed in double quotes, with an inner double quote doubled; the test class EsaCsvFormatTests pins this behavior. The golden ref-edge tests cover commas and new lines inside text values. On import a row that does not parse becomes an entry of the import problem report, not an exception.

This is an ESA technical check (layer W1a, severity: blocking). If it fails, the package is technically rejected on receipt (feedbackMain = REJECTED). RegisterBench has no runtime finding for it: the package writer satisfies it by construction, which is proven by golden tests, not by a validation message.

Most common causes

  • A hand edit in a text editor broke the quoting - an unquoted value contains a comma or a line break, so the row falls apart into the wrong number of columns.
  • A spreadsheet re-save changed the csv convention (a different separator or quoting style than the fixed comma plus double quotes).
  • A package built by another tool does not quote values containing footnote-26 characters, or leaves an unbalanced double quote in a row.

How to fix it, step by step

  1. If the package was exported by RegisterBench and not edited afterwards, this check cannot fail - the writer quotes footnote-26 characters by construction; first check whether a csv was edited or re-saved.
  2. Open the flagged file and find the broken row: any value containing a comma, carriage return, linefeed or double quote must be enclosed in double quotes.
  3. Mind the knock-on effect named by the artifact comment: a file that cannot be integrated makes many foreign keys fail with 807 - fix the 809 formatting first, then re-check the 807 findings.
  4. Do not patch rows by hand - export the package again from RegisterBench.

Example: fails vs passes

Fails - a value with a footnote-26 character travels unquoted:

Row fragment in a template csv Problem
...,Cloud services, EU region,... the value contains a comma and is not enclosed in double quotes - the row parses into one column too many
a value with a line break, unquoted the row breaks in two - neither half parses into the header's columns

Passes - the same value quoted per footnote 26:

Row fragment in a template csv Result
...,"Cloud services, EU region",... the comma travels inside the double quotes - the row parses into exactly the header's columns
  • 807 - the artifact comment of 809 names the dependency itself: a table that cannot be integrated makes many foreign keys fail with 807; fix 809 first.
  • 801 - a wrong header column code is an 801 problem; 809 is about the data rows parsing.
  • 306 - bytes that do not decode are an encoding problem (306); a decoded row that does not parse is 809.

This page describes what the software does. It is neither legal advice nor an interpretation of any regulation, and using the product does not by itself make any submission complete, correct or acceptable to any authority. The responsibility for what is filed stays with the entity that files it.