How to read TTL/n-triple dumps?

I got organisations ttl file from https://permid.org/download. While trying to parse it with RDFLib, I get parsing errors. I tried it with n-triple file as well.
How do I read this file? I want to convert this to csv and I'm open to any programming language to do so.
Thanks

Best Answer

  • Jirapongse
    Answer ✓

    I found one solution to convert the ttl to csv in stack overflow. It uses arq command in Apache Jena.

    To convert to CSV, I have to create a SPARQL query.

    For example, the query for converting OpenPermID-bulk-assetClass-20180506_071050.ttl to CSV looks like:

    The above query is saved in assetQuery.rq.

    image

    Then, run the arq tool.

    arq --data Open
    PermID-bulk-assetClass-20180506_071050.ttl --query assetQuery.rq --results csv > asset.csv

    The content in asset.csv file is:

    image

Answers