\set VERBOSITY terse --------------------------------- Wikidata (Blazegraph) --------------------------------- CREATE SERVER wikidata FOREIGN DATA WRAPPER rdf_fdw OPTIONS (endpoint 'https://query.wikidata.org/sparql', connect_retry '0'); -- IRI description SELECT subject, predicate, object FROM sparql.describe('wikidata', 'DESCRIBE ') ORDER BY object::text COLLATE "C"; INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE subject | predicate | object --------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------- | | "0"^^ | | "1"^^ | | "14"^^ | | "1970-01-01T00:00:00Z"^^ | | "2015-01-01T00:00:00Z"^^ | | "2024-05-01T21:36:41Z"^^ | | "2142303130"^^ | | "2203912"^^ | | "4.27"^^ | | "Meteorological Service of Canada's automatic station for Tuktoyaktuk A (MSC ID: 2203912), Northwest Territories, Canada"@en | | "Point(-133.03 69.43)"^^ | | "Tuktoyaktuk A"@en | | "Tuktoyaktuk A"@fr | | "station météorologique automatique du Service météorologique du Canada pour Tuktoyaktuk A (ID SMC: 2203912), Territoire du Nord-Ouest, Canada"@fr | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (37 rows) -- graph pattern description SELECT subject, predicate, object FROM sparql.describe('wikidata',' PREFIX wdt: PREFIX wd: DESCRIBE ?s WHERE { ?s wdt:P734 wd:Q59853; wdt:P19 wd:Q84 ; schema:description ?d FILTER(STR(?d) = "British astronomer") }') WHERE predicate = '' AND object = '"Harold Spencer Jones"@en' ORDER BY object::text COLLATE "C"; INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': PREFIX wdt: PREFIX wd: DESCRIBE ?s WHERE { ?s wdt:P734 wd:Q59853; wdt:P19 wd:Q84 ; schema:description ?d FILTER(STR(?d) = "British astronomer") } subject | predicate | object ------------------------------------------+----------------------------------------------+--------------------------- | | "Harold Spencer Jones"@en (1 row) SELECT subject, predicate, object FROM sparql.describe('wikidata', 'DESCRIBE ', false) WHERE predicate IN ('','') ORDER BY object::text COLLATE "C"; INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE subject | predicate | object --------------------------------------------+----------------------------------------------+------------------------ | | "2024-05-01T21:36:41Z" | | "Tuktoyaktuk A" | | "Tuktoyaktuk A" (3 rows) SELECT subject, predicate, object FROM sparql.describe('wikidata', 'DESCRIBE ', true) WHERE predicate IN ('','') ORDER BY object::text COLLATE "C"; INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE subject | predicate | object --------------------------------------------+----------------------------------------------+--------------------------------------------------------------------- | | "2024-05-01T21:36:41Z"^^ | | "Tuktoyaktuk A"@en | | "Tuktoyaktuk A"@fr (3 rows) SELECT subject, predicate, object FROM sparql.describe( query =>'describe wd:Q471896', server => 'wikidata', base_uri => 'http://test.base.uri/', raw_literal => false) WHERE predicate = '' ORDER BY object::text COLLATE "C"; INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': describe wd:Q471896 subject | predicate | object ------------------------------------------+----------------------------------------------+-------------------------------- | | "A sápadt holdfényben" | | "In fahlem Mondlicht" | | "In the Pale Moonlight" | | "In the Pale Moonlight" | | "In the Pale Moonlight" | | "In the Pale Moonlight" | | "In the Pale Moonlight" | | "In the Pale Moonlight" | | "Kuun kalpeassa valossa" | | "La coscienza di un ufficiale" (10 rows) -- empty server SELECT * FROM sparql.describe('', 'DESCRIBE '); ERROR: SERVER cannot be empty -- empty DESCRIBE pattern SELECT * FROM sparql.describe('wikidata', ''); ERROR: DESCRIBE pattern cannot be empty -- empty SERVER and DESCRIBE pattern SELECT * FROM sparql.describe('', ''); ERROR: SERVER cannot be empty -- NULL DESCRIBE pattern SELECT * FROM sparql.describe('wikidata', NULL); subject | predicate | object ---------+-----------+-------- (0 rows) -- NULL SERVER SELECT * FROM sparql.describe(NULL, 'DESCRIBE '); subject | predicate | object ---------+-----------+-------- (0 rows) -- NULL SERVER and DESCRIBE pattern SELECT * FROM sparql.describe(NULL, NULL); subject | predicate | object ---------+-----------+-------- (0 rows) -- invalid SERVER SELECT * FROM sparql.describe('invalid', 'DESCRIBE '); ERROR: invalid SERVER: invalid SELECT * FROM sparql.describe(' ', 'DESCRIBE '); ERROR: a SERVER cannot contain only whitespace characters -- invalid DESCRIBE pattern SELECT * FROM sparql.describe('wikidata', 'invalid'); ERROR: invalid DESCRIBE query: invalid SELECT * FROM sparql.describe('wikidata', ' '); ERROR: a DESCRIBE pattern cannot contain only whitespace characters SELECT * FROM sparql.describe('wikidata', 'DESCRIBE http://www.wikidata.org/entity/Q61308849'); -- missing < > INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE http://www.wikidata.org/entity/Q61308849 ERROR: Unable to establish connection to 'https://query.wikidata.org/sparql' (HTTP status 400) -- DESCRIBE pattern with a blank node SELECT * FROM sparql.describe('wikidata', '_:bnode1'); ERROR: invalid DESCRIBE query: _:bnode1 SELECT * FROM sparql.describe('wikidata', 'DESCRIBE _:bnode1'); INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE _:bnode1 ERROR: Unable to establish connection to 'https://query.wikidata.org/sparql' (HTTP status 400) -- malformed entity IRI SELECT * FROM sparql.describe('wikidata', 'DESCRIBE '); INFO: SPARQL query sent to 'https://query.wikidata.org/sparql': DESCRIBE subject | predicate | object ---------+-----------+-------- (0 rows) -- SELECT query SELECT * FROM sparql.describe('wikidata', 'SELECT ?s ?p ?o WHERE {?s ?p ?o}'); ERROR: invalid DESCRIBE query: SELECT ?s ?p ?o WHERE {?s ?p ?o} DROP SERVER wikidata; ----------------------------------- Virtuoso (DBpedia) ----------------------------------- CREATE SERVER dbpedia FOREIGN DATA WRAPPER rdf_fdw OPTIONS (endpoint 'https://dbpedia.org/sparql'); -- IRI description SELECT subject, predicate, object FROM sparql.describe('dbpedia','dEsCrIBe ') ORDER BY subject::text, object::text COLLATE "C"; INFO: SPARQL query sent to 'https://dbpedia.org/sparql': dEsCrIBe subject | predicate | object --------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | "1105395115"^^ | | "1824"^^ | | "1917-03-29"^^ | | "1917-03-29"^^ | | "4"^^ | | "43826736"^^ | | "Alien Blood is a 1917 silent film drama directed by Burton George and starring Winifred Greenwood. It is taken from a short story, The Alien Blood, by Louise Rice. The film is preserved at the Library of Congress."@en | | "Alien Blood is a 1917 silent film drama directed by Burton George and starring Winifred Greenwood. It is taken from a short story, The Alien Blood, by Louise Rice. The film is preserved at the Library of Congress."@en | | "Alien Blood"@en | | "Alien Blood"@en | | "Alien Blood"@en | | "Balboa Amusement Producing Company"@en | | "Burton George"@en | | "Captain Leslie T. Peacocke"@en | | "E. D. Horkheimer"@en | | "General Film"@en | | "H. M. Horkheimer"@en | | "Paul Garnett"@en | | "Silent film ..English titles"@en | | "The Alien Blood è un film muto del 1917 diretto da Burton George."@it | | "The Alien Blood è un film muto del 1917 diretto da Burton George."@it | | "The Alien Blood"@it | | "United States"@en | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (76 rows) DROP SERVER dbpedia;