question

Upvotes
Accepted
1 1 1 2

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

intelligent-tagging-apipermid-apiopen-permid-apirdf
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

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.

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:


asset.png (44.2 KiB)
assetquery.png (18.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea