Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for named graphs #3

Open
flamingofugang opened this issue Dec 15, 2015 · 10 comments
Open

Add support for named graphs #3

flamingofugang opened this issue Dec 15, 2015 · 10 comments
Labels
deferred enhancement fuseki2 Issues regarding Fuseki 2 integration
Milestone

Comments

@flamingofugang
Copy link
Contributor

flamingofugang commented Dec 15, 2015

I just modified the 'fuseki_example.ttl' a little bit to make it point to two hdt files I have generated. But I got the following error message when I tried to start the fuseki with config file:

[fug2@virtuosodev11 hdt-fuseki]$ bin/hdtEndpoint.sh --config=fuseki_example.ttl
com.hp.hpl.jena.assembler.exceptions.AssemblerException: caught: Adjacency list bitmap and array should have the same size
doing:
root: file:///home/fug2/hdt-java/hdt-fuseki/fuseki_example.ttl#graph1 with type: http://www.rdfhdt.org/fuseki#HDTGraph assembler class: class org.rdfhdt.hdtjena.HDTGraphAssembler
root: file:///home/fug2/hdt-java/hdt-fuseki/fuseki_example.ttl#dataset with type: http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler class: class com.hp.hpl.jena.sparql.core.assembler.DatasetAssembler


the changed fuseki_example.ttl file is as follow:

<#graph1> rdfs:label "RDF Graph1 from HDT file" ;
        rdf:type hdt:HDTGraph ;
        hdt:fileName "/export/home/SSD/BIGDATA/hdt/pc_compound_0.hdt" ;
    .
<#graph2> rdfs:label "RDF Graph2 from HDT file" ;
        rdf:type hdt:HDTGraph ;
        hdt:fileName "/export/home/SSD/BIGDATA/hdt/pc_compound_1.hdt" ;
    .
@mielvds
Copy link
Member

mielvds commented Dec 16, 2015

How did you generate the HDT files?

@flamingofugang
Copy link
Contributor Author

flamingofugang commented Dec 16, 2015

I built 'hdt-cpp' with 'serd' and used the tool 'rdf2hdt'. I first concat multiple gz files and gunzip them and did the convertion:
cat /path-to-my-files/*.gz | gunzip | /<path>/hdt-cpp/hdt-lib/tools/rdf2hdt -f turtle /dev/stdin output.hdt

@flamingofugang
Copy link
Contributor Author

I have tried the other way: convert turtle format to nt format first using serdi, then convert nt file into hdt. The fuseki server can start now.

I am starting fuseki server with three hdt files. The server can start and when I run
select distinct ?g where {graph ?g {?s ?p ?o}}
It can correctly return three graphs. But when I try to query one graph, nothing comes back, for instance:
select *
from
where {?s ?p ?o}
limit 100

no records returned...

Any comment?

@flamingofugang
Copy link
Contributor Author

To generalize my question, how to configure hdt-fuseki to allow sparql query against named graph.

@flamingofugang
Copy link
Contributor Author

flamingofugang commented Dec 16, 2015

here is part of my config file:

[] rdf:type fuseki:Server ;
   ja:loadClass "org.rdfhdt.hdtjena.HDTGraphAssembler" ;

   fuseki:services (
     <#service1>
   ) .
<#service1> rdf:type fuseki:Service ;
    fuseki:name                     "hdt" ;
    fuseki:serviceQuery             "query" ;
    fuseki:serviceReadGraphStore    "get" ;
    fuseki:dataset                   <#dataset> ;

<#dataset> rdf:type ja:RDFDataset ;
    rdfs:label "Dataset" ;
    ja:namedGraph
       [ ja:graphName  <http://rdf.ncbi.nlm.nih.gov/pubchem/compound7> ;
          ja:graph      <#graph7> ] 
   .


<#graph7> rdfs:label "RDF Graph7 from HDT file" ;
        rdf:type hdt:HDTGraph ;
        hdt:fileName "/export/home/SSD/BIGDATA/hdt/pc_compound_7.hdt" ;
    .

@flamingofugang
Copy link
Contributor Author

It seems to me that 'hdt-fuseki' can only work with default graph instead of named graph, am I missing something?

@flamingofugang
Copy link
Contributor Author

flamingofugang commented Dec 16, 2015

It seems FROM and FROM NAMED clauses do not work, but if I do
select * where {graph ?g {?s ?p ?o}} limit 100
it does work

@artob artob changed the title hdt-fuseki running error Add support for named graphs Jun 13, 2016
@artob
Copy link
Contributor

artob commented Jun 13, 2016

Retitled the ticket to reflect the remaining issue at hand.

@bryaakov
Copy link

👍
we would love to see this enhancement in HDT, as we use named graphs in production.

@mielvds mielvds added this to the 2.1.3 milestone Feb 1, 2022
@mielvds mielvds removed this from the 2.1.3 milestone Feb 16, 2022
@mielvds mielvds added deferred fuseki2 Issues regarding Fuseki 2 integration labels Feb 16, 2022
@D063520 D063520 added this to the 3.1.0 milestone Mar 21, 2022
@D063520
Copy link
Contributor

D063520 commented May 17, 2023

@QuentinJanuel: hola, this is the issue and here is an example of data, just take a subset for it ....

https://data.dws.informatik.uni-mannheim.de/structureddata/2022-12/quads/

Also Antoine just pushed code to parse quads. So this part is fine : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred enhancement fuseki2 Issues regarding Fuseki 2 integration
Projects
None yet
Development

No branches or pull requests

5 participants