Skip to content

discussion: bidirectionality #70

@justin2004

Description

@justin2004

we can consume from, say, a csv file but it might be interesting to think about inserting into a csv file too.

e.g.

/mnt/test3.csv:

name,friend,age
"fred","joe",10
"sally","jim",
"will","bill",""
"joe","N/A",""

and then something like this:

curl --silent 'http://localhost:3000/sparql.anything'  \
--header "Accept: text/csv" \
--data-urlencode 'query=
PREFIX xyz: <http://sparql.xyz/facade-x/data/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX fx: <http://sparql.xyz/facade-x/ns/>
delete { ?s xyz:name "will" }
insert { ?s xyz:name "willomena" }
where {
 SERVICE <x-sparql-anything:> {
   fx:properties fx:location "/mnt/test3.csv" ;
                 fx:csv.headers "true" ;
.
   ?s xyz:name "will" .
 }
}'

could turn /mnt/test3.csv into:

"fred","joe",10
"sally","jim",
"willomena","bill",""
"joe","N/A",""

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions