Moldova broke our data pipeline
11–20 of 61 posts
Re: Moldova broke our data pipeline
#12Ah, but what _is_ the boundary, asks Transnistria?
Re: Moldova broke our data pipeline
#13Re: Moldova broke our data pipeline
#14Re: Moldova broke our data pipeline
#15"Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes."
If the DMS output isn’t quoting fields that contain commas, that’s technically invalid CSV.
A small normalization step before COPY (or ensuring the writer emits RFC-compliant CSV in the first place) would make the pipeline robust without renaming countries or changing delimiters.
That way, if/when the DMS output is fixed upstream, nothing downstream needs to change.
Re: Moldova broke our data pipeline
#16Re: Moldova broke our data pipeline
#17Earlier quoted context omitted.
CSV quoting is dialect dependent. Honestly you should just never use CSV for anything if you can avoid it, it's inferior to TSV (or better yet JSON/JSONL) and has a tendency to appear like it's working but actually be hiding bugs like this one.
Most CSV dialects have no problem having double quoted commas. The "dialect dependent" part is usually about escaping double quotes, new lines and line continuations. Not a portable format, but it is not too bad (for this use) either considering the country list is mostly static
Re: Moldova broke our data pipeline
#18"Sanitize at the boundary" Ah, but what _is_ the boundary, asks Transnistria?
Re: Moldova broke our data pipeline
#19Re: Moldova broke our data pipeline
#20The majority of countries official names are in this format. We just use the short forms. "Republic of ..." is the most common formal country name: https://en.wikipedia.org/wiki/List_of_sovereign_states