Files to RDF

Description

Files to RDF (uv-t-filesToRdf):

This DPU extracts RDF data from input files of any RDF file format and produces RDF graphs as the output.

By default, the RDF format of the input files is estimated automatically based on the extensions of the input file names. The user can also manually specify the RDF format of the input files in the configuration to make sure the correct RDF format is applied.

Based on the selected policy for creation of the output RDF graphs, the output RDF data unit contains either

  • one output RDF graph for each processed input file (by default) OR 
  • one single output RDF graph for all processed input files.

In the case of one output graph for each processed input file, the symbolic names for output RDF graphs are created based on the symbolic names of input files. When only one single output graph is generated, the symbolic name of the single output RDF graph may be specified in the configuration.

This DPU supports RDF Validation extension.

Configuration Parameters

NameDescriptionExample
RDF format of the input filesRDF format of the data in the input files. AUTO = automatic selection of the RDF format of the input files (default)
What to do if the RDF extraction from certain file failsStop execution (default) OR Skip that file and continue
Policy for creation of the output RDF graphsOne output RDF graph for each processed input file (default) OR Single output RDF graph for all processed input files
Symbolic name of the single output RDF graphThe desired symbolic name of the single output RDF graph may be specified here. This is only applicable when the policy for the creation of output RDF graphs is set to 'Single output RDF graph'.graph3
Use file entry name as virtual graphWhen checked, the DPU also automatically generates Virtual Graph metadata, which are set to be equal to the symbolic name of the file (it is expected that symbolic name is e.g. HTTP URL).

Inputs and Outputs

NameTypeDataUnitDescriptionRequired
filesInputinputFilesDataUnitInput file containing RDF data(tick)
rdfOutputoutputRDFDataUnitExtracted RDF data(tick)

Notes

RDF Format

The following RDF formats are available in this DPU:

  • N-Triples
  • RDF/XML
  • Turtle
  • N3
  • RDF/JSON
  • TriG
  • N-Quads
  • BinaryRDF
  • TriX
  • JSON-LD

Examples

Download a File Containing RDF Triples, Convert It to RDF and Use It as Source for a SPARQL Construct Query

The following image shows a fragment of a pipeline which downloads a TriG file, converts the file to RDF and then uses the output as basis for a SPARQL Construct query. The image below shows the configuration of the DPU.