Skip to main content

I need to create an RDF Turtle (ttl) file to CSV convertor for asset data structures. There seems no RDF reader in FME available. What would be the best approach to read RDF Turtle files into FME for further processing ?

Hi @ronald.coenen​ I've never worked with a RDF .ttl file myself. If you're willing to share a sample file with us here we can have a look at trying to read the file in. From what I can find, the file itself is closest to an XML file, so I would start out by testing the XML Reader and go from there.

Unfortunately at the moment we do not have a RDF Reader.


Hi @danminneyatsaf​ , thanks for your reply. 

I have included a short version of a large RDF .ttl file to get an understanding of the structure. 

@prefix schema: <https://schema.org/> .
@prefix :      <http://example.org/xml/> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix org:   <http://data.organization.com/id/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:  <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix otldemo: <http://www.laces-platform.tech/semmtech/ns/semmtech/private/live/demo/library/infrastructure-otl/> .
@prefix demo:  <http://www.example.org/demo/> .
@prefix spl:   <http://spinrdf.org/spl#> .
@prefix rxml:  <http://example.org/test1/> .
@prefix bs:    <https://w3id.org/def/basicsemantics-owl#> .
@prefix dsa:   <http://w3id.org/dsa/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix tennet: <http://data.tennet.eu/def/> .
@prefix xml:   <http://www.semmweb.com/publication/ns/semmtech/schema/w3c-xml/> .
@prefix spin:  <http://spinrdf.org/spin#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix sem:   <http://www.semmtech.com/schema/sem/> .
@prefix sp:    <http://spinrdf.org/sp#> .
@prefix dom4:  <http://www.semmweb.com/publication/ns/semmtech/schema/w3c-dom4/> .
@prefix semnta: <http://www.example.org/ddasem/20181107161046/> .
 
<http://data.tennet.eu/id/c8673fea-9888-eb11-b674-001dd8d702b3>
        a                     tennet:Specification ;
        rdf:value             "De afscherming dient rondom te zijn geaard door middel van wartels en/of EMC-dichte doorvoeringen tussen ruimten van verschillende storingsniveaus en bij invoer in apparatuurkasten." ;
        tennet:isSubmittedBy  <http://data.tennet.eu/id/a0cf9c84-9118-ed11-b68d-001dd8d702af> ;
        tennet:status         "definitief" ;
        skos:notation         "AM-Req-1329" ;
        skos:prefLabel        "EMC Aarding - Secundaire installatie - Uitvoeringsvorm-VII (07)" .
 
<http://data.tennet.eu/id/abd10b9d-773d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-08-18" ;
        tennet:executes            <http://data.tennet.eu/id/93d10b9d-773d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> .
 
<http://data.tennet.eu/id/dfe91391-773d-ed11-b690-001dd8d702b4>
        a                          tennet:VerificationPlan ;
        tennet:hasAsSubject        <http://data.tennet.eu/id/87d16824-dc7d-ec11-b686-001dd8d702b4> ;
        tennet:isVerificationOf    <http://data.tennet.eu/id/50dcc9b1-9a88-eb11-b674-001dd8d702b3> ;
        tennet:phase               "06. Uitvoeringsontwerp" ;
        tennet:verificationMethod  "Documentinspectie/-beoordeling" .
 
<http://data.tennet.eu/id/20e15815-027e-ec11-b686-001dd8d702b4>
        a                       <http://data.tennet.eu/id/56d9ba1b-568d-eb11-b674-001dd8d702b3> ;
        tennet:8f9eefff-4833-3e89-ab80-673efc9b4a52
                "AsDesigned" ;
        tennet:isRealizationOf  <http://data.tennet.eu/id/0fa950f6-ca7c-eb11-a2fa-00155d654106> ;
        skos:notation           "-B1-JE1-KA2-PG1-KFA4" ;
        skos:prefLabel          "Buchholzbeveiligingen" .
 
<http://data.tennet.eu/id/5ff87c86-783d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-09-25" ;
        tennet:executes            <http://data.tennet.eu/id/45f87c86-783d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/1c0783c5-763d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-10-01" ;
        tennet:description         "scherfwand 120min brandwerend uitgevoerd" ;
        tennet:executes            <http://data.tennet.eu/id/010783c5-763d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/25431c0c-763d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-09-30" ;
        tennet:executes            <http://data.tennet.eu/id/09431c0c-763d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/87f02704-2880-eb11-a2fb-00155d652852>
        a                     tennet:Specification ;
        rdf:value             "Opdrachtnemer dient voor alle (delen van) objecten in de SBS in geval van de verificatiemethode testen een testplan  op te stellen." ;
        tennet:isDerivedFrom  <http://data.tennet.eu/id/df6e37f8-2780-eb11-a2fb-00155d652852> ;
        tennet:isSubmittedBy  <http://data.tennet.eu/id/a0cf9c84-9118-ed11-b68d-001dd8d702af> ;
        tennet:status         "definitief" ;
        skos:notation         "VS2-Req-1163.01" ;
        skos:prefLabel        "Opstellen testplan" .

 


Hi @danminneyatsaf​ , thanks for your reply. 

I have included a short version of a large RDF .ttl file to get an understanding of the structure. 

@prefix schema: <https://schema.org/> .
@prefix :      <http://example.org/xml/> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix org:   <http://data.organization.com/id/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:  <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix otldemo: <http://www.laces-platform.tech/semmtech/ns/semmtech/private/live/demo/library/infrastructure-otl/> .
@prefix demo:  <http://www.example.org/demo/> .
@prefix spl:   <http://spinrdf.org/spl#> .
@prefix rxml:  <http://example.org/test1/> .
@prefix bs:    <https://w3id.org/def/basicsemantics-owl#> .
@prefix dsa:   <http://w3id.org/dsa/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix tennet: <http://data.tennet.eu/def/> .
@prefix xml:   <http://www.semmweb.com/publication/ns/semmtech/schema/w3c-xml/> .
@prefix spin:  <http://spinrdf.org/spin#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix sem:   <http://www.semmtech.com/schema/sem/> .
@prefix sp:    <http://spinrdf.org/sp#> .
@prefix dom4:  <http://www.semmweb.com/publication/ns/semmtech/schema/w3c-dom4/> .
@prefix semnta: <http://www.example.org/ddasem/20181107161046/> .
 
<http://data.tennet.eu/id/c8673fea-9888-eb11-b674-001dd8d702b3>
        a                     tennet:Specification ;
        rdf:value             "De afscherming dient rondom te zijn geaard door middel van wartels en/of EMC-dichte doorvoeringen tussen ruimten van verschillende storingsniveaus en bij invoer in apparatuurkasten." ;
        tennet:isSubmittedBy  <http://data.tennet.eu/id/a0cf9c84-9118-ed11-b68d-001dd8d702af> ;
        tennet:status         "definitief" ;
        skos:notation         "AM-Req-1329" ;
        skos:prefLabel        "EMC Aarding - Secundaire installatie - Uitvoeringsvorm-VII (07)" .
 
<http://data.tennet.eu/id/abd10b9d-773d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-08-18" ;
        tennet:executes            <http://data.tennet.eu/id/93d10b9d-773d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> .
 
<http://data.tennet.eu/id/dfe91391-773d-ed11-b690-001dd8d702b4>
        a                          tennet:VerificationPlan ;
        tennet:hasAsSubject        <http://data.tennet.eu/id/87d16824-dc7d-ec11-b686-001dd8d702b4> ;
        tennet:isVerificationOf    <http://data.tennet.eu/id/50dcc9b1-9a88-eb11-b674-001dd8d702b3> ;
        tennet:phase               "06. Uitvoeringsontwerp" ;
        tennet:verificationMethod  "Documentinspectie/-beoordeling" .
 
<http://data.tennet.eu/id/20e15815-027e-ec11-b686-001dd8d702b4>
        a                       <http://data.tennet.eu/id/56d9ba1b-568d-eb11-b674-001dd8d702b3> ;
        tennet:8f9eefff-4833-3e89-ab80-673efc9b4a52
                "AsDesigned" ;
        tennet:isRealizationOf  <http://data.tennet.eu/id/0fa950f6-ca7c-eb11-a2fa-00155d654106> ;
        skos:notation           "-B1-JE1-KA2-PG1-KFA4" ;
        skos:prefLabel          "Buchholzbeveiligingen" .
 
<http://data.tennet.eu/id/5ff87c86-783d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-09-25" ;
        tennet:executes            <http://data.tennet.eu/id/45f87c86-783d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/1c0783c5-763d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-10-01" ;
        tennet:description         "scherfwand 120min brandwerend uitgevoerd" ;
        tennet:executes            <http://data.tennet.eu/id/010783c5-763d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/25431c0c-763d-ed11-b690-001dd8d702b4>
        a                          tennet:Verification ;
        tennet:date                "2021-09-30" ;
        tennet:executes            <http://data.tennet.eu/id/09431c0c-763d-ed11-b690-001dd8d702b4> ;
        tennet:isResponsibilityOf  <http://data.tennet.eu/id/42519364-9e18-ed11-b68d-001dd8d702af> ;
        tennet:status              "conform" .
 
<http://data.tennet.eu/id/87f02704-2880-eb11-a2fb-00155d652852>
        a                     tennet:Specification ;
        rdf:value             "Opdrachtnemer dient voor alle (delen van) objecten in de SBS in geval van de verificatiemethode testen een testplan  op te stellen." ;
        tennet:isDerivedFrom  <http://data.tennet.eu/id/df6e37f8-2780-eb11-a2fb-00155d652852> ;
        tennet:isSubmittedBy  <http://data.tennet.eu/id/a0cf9c84-9118-ed11-b68d-001dd8d702af> ;
        tennet:status         "definitief" ;
        skos:notation         "VS2-Req-1163.01" ;
        skos:prefLabel        "Opstellen testplan" .

 

Hi @danminneyatsaf​ , 

 

A first test with the XML Reader was not successful, see log snipet below. 

 

XML Parser error: 'Error in input dataset:'D:\DataDrop\Test_Teruglevering_Meeden_002.949_Definitief-Content-20230104T081845Z-001\Test_Teruglevering_Meeden_002.949_Definitief-Content\EU303 - Meeden - Digitale levering september 2022\Alphanumeric\TTL-bestand MEE220kV Digitale Levering.ttl' line:1 column:1 message:invalid document structure'

The XML Module halted on error, see the logfile for details

Failed to obtain any schemas from reader 'XML' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information

FME Session Duration: 30.9 seconds. (CPU: 0.9s user, 8.7s system)

 

 


Reply