SELECT (current_setting('server_version_num')::int < 140000) AS skip_test \gset \if :skip_test \quit \endif SET timezone TO 'Etc/UTC'; CREATE SERVER wikidata FOREIGN DATA WRAPPER rdf_fdw OPTIONS ( endpoint 'https://query.wikidata.org/sparql'); CREATE FOREIGN TABLE ft ( p rdfnode OPTIONS (variable '?p'), o rdfnode OPTIONS (variable '?o') ) SERVER wikidata OPTIONS ( log_sparql 'true', sparql 'SELECT * {wd:Q192490 ?p ?o . FILTER (?p = )}'); /* * 't1' only partially matches with 'dbpedia_cities', with columns * 'city_name' and 'uri'. * SERVER option 'fetch_size' will be used, as both FOREIGN TABLE and * function call do not set 'fetch_size'. * 'commit_page' is set to 'false', so all retrieved and inserted records * are committed only when the transaction finishes. */ CREATE TABLE public.t1(p rdfnode, o rdfnode); CALL rdf_fdw_clone_table( foreign_table => 'public.ft', target_table => 'public.t1', verbose => true, commit_page => false ); WARNING: the rdf_fdw FOREIGN TABLE "ft" has columns using native PostgreSQL types which are deprecated: p, o HINT: Use the "rdfnode" type instead. INFO: setting 'fetch_size' to 100 (default) INFO: == Parameters == foreign_table: 'ft' target_table: 'public.t1' create_table: 'false' fetch_size: 100 begin_offset: 0 max_records: 0 ordering_column: 'NOT SET' ordering sparql variable: '?p' sort_order: 'ASC' INFO: SPARQL query sent to 'wikidata': SELECT ?p ?o {wd:Q192490 ?p ?o . FILTER (?p = )} ORDER BY ASC(?p) OFFSET 0 LIMIT 100 INFO: SPARQL returned 13 records. INFO: [0 - 100]: 13 records inserted INFO: SPARQL query sent to 'wikidata': SELECT ?p ?o {wd:Q192490 ?p ?o . FILTER (?p = )} ORDER BY ASC(?p) OFFSET 100 LIMIT 100 ERROR: too many requests on server "wikidata" (HTTP 429) DETAIL: Wikimedia Error