Query translation Windows vs. Linux

Hi all,
I am currently running a query over the two identical databases (same models, same virtual graph): one is hosted on the local machine (windows) and the other on the server (linux). I run the following query:

prefix sosa: <http://www.w3.org/ns/sosa/>
select distinct *
where {
  graph <virtual://tables9> {
    <…/machine/1> ?p ?o .
  }    }

The local version gives the expected results whereas when running the query on the server version I always get back “Internal Server Error”. After checking the SQL query (via EXPLAIN) we found out that the server version parsed ID-columns as “component_id” = ‘1’ (ID as string) and the local version parsed it as “component_id” = 1 (ID as integer as defined in the underlying database). Is that simply a difference of Windows and Linux or is there a possibility to define the datatype of the value in the requested database? I now changed the datatype of the respective columns in my underlying database from integer to text and now it works but it would be easier not to have to do that and leave the datatype as it was originally defined.

Thanks for your answer,
Sonja

Hi Sonja,

When you say that there are two identical databases, you mean two separate virtual graphs with the same mappings over the same database schema on different SQL instances - one on the same machine as your Stardog instance and the on a different machine?

Additionally, when you say the ID column is “parsed”, are you referring to a query in your mapping, ie. using rr:sqlQuery/sm:query?

Jess

Hi Jess,

I have one relational database and one mapping but two instances of Stardog (one trial version -> localhost = windows; one enterprise version on the server = linux). The database and the mapping are identical.

My mapping only includes sm:table-mappings:

obs:{\"observation_id\"} a sosa:Observation ;
	rdfs:label "{\"observation\"}"^^xsd:string;
	automes:has_unit_of_measure uo:{\"measurement_unit\"} ;
    sosa:resultTime "{\"result_time\"}"^^rdfs:literal ;
	sosa:madeBySensor sens:{\"sensor_id\"} ;
	  sm:map [
      sm:table "\"...\".\"observations\"" ;
    ] .

What I meant with “parsing” was the translation of SPARQL-queries to SQL-queries which are then executed on the RDB. Within this “translated” query I get the two different versions of the SQL-query (via QUERY EXPLAIN). From the Windows-instance of Stardog “component_id”=1 (ID as integer) and from the Linux-instance of Stardog “component_id”=‘1’ (ID as string).

Sonja

What versions are the instances of Stardog?

The Windows version is 5.2.2 and the Linux version is 5.2.3 (newest version)

Are you able to try 5.2.3 on Windows?

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