Hi All,

Is it possible to run a query against the union of a bunch of named graphs, where each named graph is selected by some logic? As an example, I have something like this:

select ?attr ?value ?attrName where {
    graph ?g1 {
        ?subj ?attr ?value .
    }
    graph ?g2 {
        ?attr rdfs:label ?attrName .
    }
    ?g1 xyz:good true .
    ?g2 xyz:good true .
}

...so I'm grabbing data from g1, and metadata from g2. Both g1 and g2 are selected using some kind of logic; and they might be the same graph. You can imagine a larger query, expressed in this style, could get very complex. Is there instead a way to specify a union graph made up of all the graphs for which a predicate is true, and then perform a query against that union graph?

Chris

Reply via email to