You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
NOTE: This project is deprecated after grafter.pipelines was removed fromgrafter and grafter.tabular.
It should still be usable in grafter versions prior to 0.8.12.
lein-grafter
Adds some convenient commandline tools for listing and runningpipelines in a grafter project.
Usage
Put the following into the:plugins vector of your grafter projectsproject.clj e.g.
:plugins [[lein-grafter"0.3.0"]]
Once this is done the following command line features will becomeavailable:
Listing Pipelines
Then inside a grafter pipeline that defines some pipelines withdefpipe and/ordefgraft you can list pipelines like this:
$ lein grafter listtest-project.pipeline/convert-persons-data data-file ;; An example pipeline tabular pipelinetest-project.pipeline/convert-persons-data-to-graph data-file ;; A pipeline generating linked data
Running Tabular Pipelines
You can run the pipelines with the commandlein grafter run. Pipe'sexposed withdefpipe yield tabular output and can be used to convertthe file into csv, xls or xlsx (Excel formats) by for example running.Note how grafter infers the format from the output files fileextension.
$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.csv$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.xlsx$ lein grafter run test-project.pipeline/convert-persons-data ./data/example-data.csv example-output.xls
Running Linked Data Pipelines (Grafts)
To output linked data (RDF) you must call a graft (a pipeline thatconvertstabular data -> linked data). Like withdefpipe graftsmust be exposed to the plugin withdefgraft.
They can be run in the same way as pipes e.g to output linked data asturtle:
$ lein grafter run test-project.pipeline/convert-persons-data-to-graph ./data/example-data.csv example-output.ttl
... or as n-triples:
$ lein grafter run test-project.pipeline/convert-persons-data-to-graph ./data/example-data.csv example-output.nt
Supported formats for triples and their file extensions are:
n-triples.nt
turtle.ttl
n3.n3
rdf xml.rdf
Supported formats for quads and their file extensions are: