Re: CSV-LD proposal

Hi Gregg,

Interesting stuff!

Have you looked at TARQL [1]? From my experience, turning CSV into RDF
often turn out to require way more transformation than a simple mapping
like JSON-LD can handle. I have commonly used Python for that (e.g. [2]),
but I've found TARQL to be an interesting, somewhat more constrained
(functional, more declarative) alternative.

Also, perhaps tangentially related: some years ago I built a mechanism for
turning SPARQL select results into JSON, called SparqlTree [3]. (See e.g.
the JS implementation example at [4]. I know, the output could easily be
made JSON-LD compatible. I really should...) But that works well since
you're in full control of the resulting rows.

I do agree that JSON-LD itself should not be extended with transformational
features. But in combination with a JSON transformation language, something
valuable might emerge. Perhaps JSON-LD Marcros would work? In a chain like
CSV -> JSON -> Macros -> JSON-LD.

In any case, something like TARQL is needed to add additional statements
(types etc.), to construct values and IRIs, and to build up additional
(b)nodes out of the flat digests of tables. I.e. full-fledged
transformations, needing rich expressions. (Also, I really like the clean
directness of TARQL in going from CSV to RDF. It all depends on what you
need of course.)



On Sat, Feb 1, 2014 at 3:03 AM, Gregg Kellogg <>wrote:

> FYI, the CSV on the Web working group is essentially trying to do for CSV
> (and other tabular formats) what JSON-LD did for JSON. I've put forward a
> CSV-LD proposal [1].
> Doing this would require standardizing framing, with some extensions to
> the existing algorithms, as I note within the document, this could mean
> using embedded context definitions within a frame to compact embedded nodes
> using the most specific context definition; I created issue 315 [2] to
> describe this further.
> Gregg Kellogg
> [2]
> Begin forwarded message:
> > From: Gregg Kellogg <>
> > Subject: CSV-LD proposal
> > Date: January 31, 2014 at 5:52:09 PM PST
> > To:
> >
> > I added a proposal for something I call CSV-LD to the wiki [1]. As the
> name might suggest, this is strongly tied to JSON-LD, and uses JSON-LD
> context and frame definitions to both provide meaning to CSV, allowing it
> to be losslessly transformed to JSON-LD, or to create CSV from JSON-LD
> (with or without embedding).
> >
> > Consider this a straw-man proposal. It does lay out some use cases that
> are generally useful (and perhaps should be copied to other pages on the
> wiki), but there may be more use cases to consider. IMO, creating a
> specification for this, and extending an existing JSON-LD implementation to
> support this would not be too difficult.
> >
> > Gregg Kellogg
> >
> >
> > [1]
> >

Received on Wednesday, 26 February 2014 17:08:49 UTC