TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Example of your favorite CSV Schema Documentation?

1 pointsby redlizardabout 2 years ago
I&#x27;ve been working on an interface that accepts csv, and have been struggling to find good examples of services that have solid definitions of acceptable schema (column names, types, Required&#x2F;Optional&#x2F;Constriants).<p>I&#x27;d also be interested in examples that have documented nested arrays, nested objects, or nested object arrays in csv.<p>I&#x27;ve been thinking about it alot since openAPI&#x2F;GQL really do solve documentation, and can even autogen from views, but i haven&#x27;t found something similar for CSV.

2 comments

redlizardabout 2 years ago
Ok, after a decent amount of research all i can really find is: <a href="https:&#x2F;&#x2F;digital-preservation.github.io&#x2F;csv-schema&#x2F;#toc4" rel="nofollow">https:&#x2F;&#x2F;digital-preservation.github.io&#x2F;csv-schema&#x2F;#toc4</a><p>Not in love. Doesn&#x27;t really handle nested arrays&#x2F; objects. Also doesn&#x27;t generate human readable documentation.<p>Worried I may have to roll my own :(, but this feels like it is a solved problem.<p>Breaking it down into 3 sections:<p>1. Schema Definition 2. Documentation (Autogenerated from schema) 3. Deserialization that applies type constraints and validation<p>I&#x27;d be happy with the first 2 and to take care of deserialization myself. Something with all three rolled into one would be lovely.<p>The major requirement i haven&#x27;t been able to find support for are nested objects or arrays in a csv.<p>Example header: firstname, lastname, contact_0, contact_1, contact_2, address.address_1.1, address.address_2.1, address.zip.1, address.state.1, address.address_1.2, address.address_2.2, address.zip.2, address.state.2,
not_your_vaseabout 2 years ago
I don&#x27;t know about a lotbof CSV schema defs, but I found the column definitions in SQLLoader&#x27;s control files quite intuitive.