Loading RDF Star file into the database

Hi,

I am using docker to create an instance of the Stardog. Moreover, with the python code using the Pymantic library try to create a database and load the data. I have an RDF-star data file with the file extension of .ttls. Does it mean that the .ttls file is not supported by the Stardog?

Regards,
Shahzrad

Hi Shahrzad,

Have you tried adding the data via the methods on this docs page? Additionally, Stardog has an official Python library called Pystardog which you can find the docs for here.

Best,
Clark

Hi Clark,

I am also used the Stardog python library to load my data. This is an error that I face while trying to load it.

"StardogException: [500] TXHRE2: There was a fatal failure during preparation of d34885da-daf9-40c8-b693-719157f8f875 com.stardog.stark.io.InvalidRDF: Expected '<' or '_', found: @ [L1]"

I could successfully load some RDF data with the python code and faced no problem. I only can not load the RDF-star data file.

Thanks for your help in advance.

Regards,
Shahrzad

Hi Shahrzad,

Have you tried changing the file extension to .ttl and/or specifying the file format as Turtle?

Best,
Clark

Hi Clark,

Yes, I also have tried the file extension of .ttl but when I execute conn.commit(), I face the error below:

"StardogException: [500] TXHRE2: There was a fatal failure during preparation of 5ae9a6eb-98da-418e-9648-4252106f6b74 com.stardog.stark.io.InvalidRDF: Option edge.properties is not enabled for this database, cannot add an edge property to: (_:x308825 http://example.org/intermediary_of _:x250887)"

Regards,
Shahrzad

Hi Shahrzad,

In order to use rdf-star, you must create a database with edge.properties set to true. This is immutable and must be set at creation time so you must create a new database and make sure that variable is correctly set. The documentation on edge properties can be found here.

Best,
Clark

Dear Clark,

I did not know that I need to set in at the creation time. I set the edge properties to true and it worked. Thank you so much for your help.

Regards,
Shahrzad

Great! Glad to hear everything's working now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.