Skip to content

Commit

Permalink
Add prototype for rdf_fdw_table_clone function
Browse files Browse the repository at this point in the history
This adds a prototype for the function rdf_fdw_table_clone, which
enables users to harvest all data (or a subset) from rdf_fdw foreign
tables. This function offers the possibility to extract data in small
chuncks to avoid large result sets from the target triplestore.

This patch also slightly changes the regression tests to a change in
the level of a FOREIGN TABLE logging option NOTICE > INFO.
  • Loading branch information
jimjonesbr committed Mar 1, 2024
1 parent 97f3686 commit e6c6f84
Show file tree
Hide file tree
Showing 5 changed files with 585 additions and 246 deletions.
22 changes: 11 additions & 11 deletions expected/blazegraph-wikidata.out
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SERVER wikidata OPTIONS (
SELECT atmid, bankname, atmwkt
FROM atms_munich
WHERE bankname = 'BBBank';
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


PREFIX lgdo: <http://linkedgeodata.org/ontology/>
Expand Down Expand Up @@ -98,7 +98,7 @@ SELECT wikidata_id, label, wkt
FROM places_below_sea_level
WHERE wikidata_id = 'http://www.wikidata.org/entity/Q61308849'
FETCH FIRST 5 ROWS ONLY;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT (STR(?place) AS ?placeid) (UCASE(?label) AS ?labelc) ?location
Expand Down Expand Up @@ -177,7 +177,7 @@ WHERE
base_url = 'http://www.wikidata.org/entity/' AND
ctlang = 'http://www.wikidata.org/entity/Q32LUXEMBURG'
ORDER by language;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?label (STRLEN(?nativename) AS ?1len2) (LANG(?nativename) AS ?language) (STRBEFORE(STR(?country),"Q") AS ?b4se) (STRAFTER(STR(?country),"entity/") AS ?q1d) (CONCAT(STR(?country),UCASE(?nativename)) AS ?ct) ("2002-03-08"^^xsd:date AS ?det) ("2002-03-08T14:33:42"^^xsd:dateTime AS ?ts) (STRSTARTS(STR(?country),"http") AS ?but) (STRENDS(STR(?country),"http") AS ?buf)
Expand Down Expand Up @@ -222,7 +222,7 @@ WHERE
bf IS NOT true AND
bt IS true AND
bt IS NOT false;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename (STRSTARTS(STR(?country),"http") AS ?but) (STRENDS(STR(?country),"http") AS ?buf)
Expand Down Expand Up @@ -250,7 +250,7 @@ WHERE
NOT bf IS true AND
bt IS true AND
NOT bt IS false;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename (STRSTARTS(STR(?country),"http") AS ?but) (STRENDS(STR(?country),"http") AS ?buf)
Expand Down Expand Up @@ -281,7 +281,7 @@ WHERE
bf != true AND
bt = true AND
bt != false;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename (STRSTARTS(STR(?country),"http") AS ?but) (STRENDS(STR(?country),"http") AS ?buf)
Expand All @@ -305,7 +305,7 @@ BEGIN
ORDER BY nativename
OFFSET 0 LIMIT 5;
END; $$;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename
Expand Down Expand Up @@ -353,7 +353,7 @@ BEGIN
END LOOP;

END; $$;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename
Expand All @@ -365,7 +365,7 @@ SELECT ?country ?nativename
ORDER BY ASC (?country)
LIMIT 5

NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename
Expand All @@ -377,7 +377,7 @@ SELECT ?country ?nativename
ORDER BY ASC (?country)
LIMIT 10

NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename
Expand All @@ -398,7 +398,7 @@ SELECT uri, nativename
LIMIT 15
)
SELECT * FROM local EXCEPT SELECT * FROM j;
NOTICE: SPARQL query sent to 'https://query.wikidata.org/sparql':
INFO: SPARQL query sent to 'https://query.wikidata.org/sparql':


SELECT ?country ?nativename
Expand Down
8 changes: 4 additions & 4 deletions expected/graphdb-getty.out
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SELECT DISTINCT name, lon, lat
FROM getty_places
ORDER BY lat
LIMIT 10;
NOTICE: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':
INFO: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':

PREFIX ontogeo: <http://www.ontotext.com/owlim/geo#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
Expand Down Expand Up @@ -74,7 +74,7 @@ SELECT uri, lon, lat
FROM getty_places
WHERE name = 'West Flanders, Flanders, Belgium, Europe, World'
ORDER BY lon;
NOTICE: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':
INFO: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':

PREFIX ontogeo: <http://www.ontotext.com/owlim/geo#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
Expand Down Expand Up @@ -178,7 +178,7 @@ SELECT * FROM (
FROM getty_places
WHERE lat BETWEEN 52.5 AND 53.0) j
ORDER BY lat;
NOTICE: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':
INFO: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':

PREFIX ontogeo: <http://www.ontotext.com/owlim/geo#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
Expand Down Expand Up @@ -258,7 +258,7 @@ FROM getty_non_italians
WHERE bio ~~* '%artist%'
ORDER BY birth
LIMIT 10;
NOTICE: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':
INFO: SPARQL query sent to 'http://vocab.getty.edu/sparql.xml':


PREFIX ontogeo: <http://www.ontotext.com/owlim/geo#>
Expand Down
Loading

0 comments on commit e6c6f84

Please sign in to comment.