Stardog Querying with .nt and .ttl

I’m trying to run some queries on an RDF dataset.
I have the dataset in .ttl and .nt.

The DB created with the .ttl version of the data returns triples whereas the DB created with the .nt version of the data returns 0 items.

Please help, I need to work with the data in .nt format


Please include further details such as the query executed, the data in the database under both situations and what the expected result is. Please review the summary section at the bottom of How to Report Bugs Effectively.


Thanks Jess,

I created the DB like this:

./stardog-admin --server db create -n myDB1 /home/ntp_data.ttl
./stardog-admin --server db create -n myDB2 /home/ntp_data.nt

I went on to this link:

I Clicked myDB1

Clicked on Query and pasted the query below:

PREFIX isc: <>
PREFIX nlxv: <>
PREFIX rdf: <>
PREFIX npd: <>
PREFIX void: <>
PREFIX xsd: <>
PREFIX owl: <>
PREFIX ex: <>
PREFIX quest: <>
PREFIX diskos: <>
PREFIX nlx: <>
PREFIX ptl: <>
PREFIX npdv: <>
PREFIX geos: <>
PREFIX sql: <>
PREFIX rdfs: <>
PREFIX dc: <>
PREFIX diskosv: <>
SELECT ?licenceURI ?company ?date 
    ?licenceURI a npdv:ProductionLicence .
    [ ] a npdv:ProductionLicenceOperator ;
      	npdv:dateOperatorValidFrom ?date ;
      	npdv:licenceOperatorCompany [ npdv:name ?company ] ;
      	npdv:operatorForLicence ?licenceURI .

	FILTER(?date > "1979-12-31T00:00:00"^^xsd:dateTime)
} ORDER BY ?licenceURI

Over 1000 items returned.

But when I ran the same query on myDB2 I got 0 items returned.

Both ntp_data.ttl and ntp_data.nt are the same dataset but in different format. (i.e. .ttl and .nt)

A few questions. Presumably the contents of the files are not the same if you’re getting different results from the same query.

  • Do both DBs report the same index size in the admin page?
  • Did you try running a ?s ?p ?o query on DB2 to see if the data is correct?
  • Are there any warnings/errors reported in your stardog.log file?

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