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

Change default query of /sparql #97

Open
kurzum opened this issue Jul 19, 2023 · 2 comments
Open

Change default query of /sparql #97

kurzum opened this issue Jul 19, 2023 · 2 comments
Labels
stretch task Potentially delayed to a later milestone
Milestone

Comments

@kurzum
Copy link
Member

kurzum commented Jul 19, 2023

to

PREFIX dct: <http://purl.org/dc/terms/>
PREFIX databus: <https://dataid.dbpedia.org/databus#>
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
PREFIX dcat: <http://www.w3.org/ns/dcat#>

select ?latestDatasets ?version ?title ?description ?license (count(?dist) as ?nrOfFiles) (sum(?bytesize) as ?sumfilesize) ?account where { 
         ?latestDatasets 
                 a databus:Version ;
                 dct:title ?title ;
                 dct:description ?description ;
                 dct:hasVersion ?version ;
                 dct:license ?license ;
                 dct:issued ?issued;
                 dcterms:modified ?modified ;
                 databus:account ?account ;
                 dcat:distribution  ?dist .
                 ?dist dcat:byteSize ?bytesize  
            
} ORDER BY DESC(?issued) 
LIMIT 100

feature here is that people can start with this one and then experiment to get what they want.

@kurzum kurzum added this to the 2.1.0 milestone Jul 19, 2023
@kurzum kurzum added the stretch task Potentially delayed to a later milestone label Jul 19, 2023
@holycrab13
Copy link
Contributor

Tried this:

VIRT_SPARQL_DEFAULTQUERY: >
        PREFIX dct: <http://purl.org/dc/terms/>
        PREFIX databus: <https://dataid.dbpedia.org/databus#>
        PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
        PREFIX dcat: <http://www.w3.org/ns/dcat#>
        
        SELECT ?latestDatasets ?version ?title ?description ?license (COUNT(?dist) as ?nrOfFiles) (SUM(?bytesize) as ?sumfilesize) ?account WHERE { 
          ?latestDatasets
            a databus:Version ;
            dct:title ?title ;
            dct:description ?description ;
            dct:hasVersion ?version ;
            dct:license ?license ;
            dct:issued ?issued;
            dcterms:modified ?modified ;
            databus:account ?account ;
            dcat:distribution  ?dist .
          ?dist dcat:byteSize ?bytesize .
        } ORDER BY DESC(?issued)
        LIMIT 100

Does not work with the virtuoso.ini, waiting for a response from the virtuoso devs

@holycrab13
Copy link
Contributor

Multiline queries are currently not supported by virtuoso. This might get worked on in the future. Pushing the issue back to a later milestone.

@holycrab13 holycrab13 modified the milestones: 2.1.0, 2.x.x Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stretch task Potentially delayed to a later milestone
Projects
None yet
Development

No branches or pull requests

2 participants