This pipeline uses barnard59 to generate triples from a JSON file using a carml mapping.
To generate the mapping files out of the XRM mappings, you can use our Expressive RDF Mapper (XRM) tool.
Put your input in a single input.json file in the input directory.
Then run the following:
npm install # install dependencies
npm run start # run the pipelineYou will find the generated triples in the output directory.
input: should contain some JSON files (not included in this repository) ; it will be used by the pipeline to generate triplesmapping: XRM mapping files, to map fields from the JSON files to specific triplesmetadata: some static triples that need to be publishednode_module: contains the source code of all dependencies required to run the pipeline ; it should never be pushedoutput: contain triple files with the generated triples from the pipelinepipelines: contains the pipeline definitionscripts: some useful scriptssrc-gen: the generated mapping file for carml.gitlab-ci.yml: the GitLab CI pipeline declarationpackage.json: specify the version of each dependency that is used and define some useful scripts
The GitLab CI pipeline is doing the following:
github: this step is only run on a push on themainbranch. It pushes the content of the repository we have on GitLab to GitHub.fetch: this step fetches the latest JSON file for all prefixes defined in thescripts/file_prefix.shfile and will store them in theinputdirectory.process: there are two main jobs for that step:metadata: this job generates the triples from the Turtle files (extension.ttl) that are stored in themetadatadirectory into aoutput/metadata.ntfile. That way everything is converted into the right format and is stored into a single file.process: this job splits the JSON files into smaller chunks and run the pipeline on each of them.
store: this step publishes the generated triples from the previous step (every file with.ntextension from theoutputdirectory) to the triple store.