mimiro-io / datahub-cli

The MIMIRO Data Hub CLI, known as mim, provides command line control over a MIMIRO data hub instance or any Universal Data Specification (UDA) compliant endpoint
Apache License 2.0
5 stars 2 forks source link

add support for virtual datasets #206

Closed rompetroll closed 6 months ago

rompetroll commented 6 months ago

usage: mim dataset create a.ds --virtual --transform=$(echo 'function build_entities(params, since) { Emit(NewEntity()); return "5" }' | base64 -w0)

to verify: mim dataset changes a.ds --json produces

[{"id":"@context","namespaces":{"ns0":"http://data.mimiro.io/core/dataset/"}},{"id":"","recorded":0,"deleted":false,"refs":{},"props":{}},{"id":"@continuation","token":"5"}]

usage with publicNamespaces (preferable):

mim dataset create a.ds \
  --virtual \
  --transform=$(echo 'function build_entities(params, since) { Emit(NewEntity()); return "5" }' | base64 -w0) \
  --publicNamespaces=http://data.mimiro.io/core/dataset/,http://www.w3.org/1999/02/22-rdf-syntax-ns\#

Closes #205