rdf_fdw
rdf_fdw : Foreign data wrapper for RDF triplestores over SPARQL endpoints
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 8760 | rdf_fdw
|
rdf_fdw
|
2.4.0 |
FDW
|
MIT
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-r
|
No
|
Yes
|
No
|
Yes
|
yes
|
no
|
| Relationships | |
|---|---|
| See Also | wrappers
multicorn
postgres_fdw
sparql
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
2.4.0 |
18
17
16
15
14
|
rdf_fdw |
- |
| RPM | PIGSTY
|
2.4.0 |
18
17
16
15
14
|
rdf_fdw_$v |
- |
| DEB | PIGSTY
|
2.4.0 |
18
17
16
15
14
|
postgresql-$v-rdf-fdw |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el8.aarch64
|
MISS
|
MISS
|
MISS
|
MISS
|
MISS
|
el9.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
el9.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
el10.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
el10.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
d12.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
d12.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
d13.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
d13.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
u22.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
u22.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
u24.x86_64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
u24.aarch64
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
PIGSTY 2.4.0
|
Source
pig build pkg rdf_fdw; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install rdf_fdw; # install via package name, for the active PG version
pig install rdf_fdw -v 18; # install for PG 18
pig install rdf_fdw -v 17; # install for PG 17
pig install rdf_fdw -v 16; # install for PG 16
pig install rdf_fdw -v 15; # install for PG 15
pig install rdf_fdw -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION rdf_fdw;Usage
Syntax:
CREATE EXTENSION rdf_fdw; CREATE SERVER dbpedia FOREIGN DATA WRAPPER rdf_fdw OPTIONS (endpoint 'https://dbpedia.org/sparql');Source: README
rdf_fdw is a foreign data wrapper for RDF triplestores exposed through SPARQL endpoints. It lets PostgreSQL query RDF data with SQL, supports SQL clause pushdown, adds an rdfnode type for RDF terms, and includes SPARQL 1.1 function support.
Server Setup
Register a SPARQL endpoint with CREATE SERVER:
CREATE SERVER dbpedia
FOREIGN DATA WRAPPER rdf_fdw
OPTIONS (endpoint 'https://dbpedia.org/sparql');The README documents server options such as:
endpoint(required)batch_sizeenable_pushdownformathttp_proxyconnect_timeout
Proxy credentials belong in a user mapping.
Foreign Tables
rdf_fdw works by declaring foreign tables that embed SPARQL queries and map result variables to PostgreSQL columns. The README also highlights native RDF node handling through the custom rdfnode type.
Pushdown and DML
The upstream docs specifically call out pushdown for:
WHERELIMITORDER BYDISTINCT
They also document data modification support:
INSERTUPDATEDELETE
Batching for SPARQL UPDATE traffic is controlled with the batch_size option.
Helper Functions
The README lists utility functions including:
rdf_fdw_version()rdf_fdw_settings()rdf_fdw_clone_table()
It also documents broader SPARQL function coverage, including aggregates, string functions, numeric functions, date/time functions, hash functions, and custom functions.
Notes
The current README warns that retrieved RDF data is loaded into memory before conversion for PostgreSQL, so large result sets require adequate PostgreSQL memory. It also documents PostgreSQL 9.5+ as the supported baseline.