Foreign data wrappers

From PostgreSQL wiki

Jump to: navigation, search

Contents

Foreign Data Wrappers

In 2003, a new specification called SQL/MED ("SQL Management of External Data") was added to the SQL standard. It is a standardized way of handling access to remote objects from SQL databases. In 2011, PostgreSQL 9.1 was released with read-only support of this standard, and in 2013 write support was added with PostgreSQL 9.3.

There are now a variety of Foreign Data Wrappers (FDW) available which enable PostgreSQL Server to different remote data stores, ranging from other SQL databases through to flat file. This page list some of the wrappers currently available. Another fdw list can be found at the PGXN website.

Please keep in mind that most of these wrappers are not officially supported by the PostgreSQL Global Development Group (PGDG) and that some of these projects are still in Beta version. Use carefully!


Generic SQL Database Wrappers

Data Source Type Licence Code Install Doc Notes
ODBC Native github PGXN example Does not compile with PostgreSQL >= 9.2!
ODBC Native github A patched, but completely untested version
JDBC Native github Not maintained ?
JDBC2 Native github
SQL_Alchemy Multicorn PostgreSQL GitHub PGXN documentation Can be used to access data stored in any database supported by the sqlalchemy python toolkit.
VirtDB Native GPL GitHub short intro A generic FDW to access VirtDB data sources (SAP ERP , Oracle RDBMS)

Specific SQL Database Wrappers

Data Source Type Licence Code Install Doc Notes
PostgreSQL Native PostgreSQL git.postgresql.org documentation
Oracle Native github PGXN website
MySQL Native github PGXN example An early version of the Foreign Data Wrapper for MySQL that supports PostgreSQL 9.1 and above:
MySQL Native github PGXN example An updated FDW for MySQL that support PostgreSQL 9.3 and above
Informix Native github
Firebird Native github PGXN currently work-in-progress.
SQLite Native github An FDW for SQLite3 (read-only)
Sybase / MS SQL Server Native github PGXN An FDW for Sybase and Microsoft SQL server
MonetDB Native github

NoSQL Database Wrappers

Data Source Type Licence Code Install Doc Notes
Cassandra Native PostgreSQL Github
CouchDB Native PostgreSQL Github PGXN Original version
CouchDB Native PostgreSQL Github golgauth version (9.1 - 9.2+ compatible)
Kyoto Tycoon Native MIT Github
MongoDB Native GPL3+ Github PGXN README EDB version
MongoDB Multicorn Github
Neo4j Native ? Github
Redis Native PostgreSQL Github
Redis Native BSD Github
RethinkDB Multicorn MIT Github blog
Riak Multicorn Github
WhiteDB Native MIT Github

File Wrappers

Data Source Type Licence Code Install Doc Notes
CSV Native PostgreSQL documentation Delivered as an official extension of PostgreSQL 9.1 / example / Another example
CSV Multicorn PostgreSQL GitHub PGXN documentation Each column defined in the table will be mapped, in order, against columns in the CSV file.
CSV / Text Array Native GitHub How to Another CSV wrapper
CSV / Fixed-length Native GitHub
Compressed File Native GitHub
Document Collection Native PostgreSQL GitHub wiki
JSON Native GPL3 GitHub Example
Multi-File Multicorn PostgreSQL GitHub PGXN doc Access data stored in various files in a filesystem. The files are looked up based on a pattern, and parts of the file's path are mapped to various columns, as well as the file's content itself.
Multi CDR Native PostgreSQL GitHub PGXN
pg_dump Native New BSD GitHub Allows querying of data directly against Postgres custom format files created by pg_dump
XML Multicorn PostgreSQL GitHub PGXN

Geo Wrappers

Data Source Type Licence Code Install Doc Notes
GDAL/OGR Native GitHub A wrapper for data sources with a GDAL/OGR driver, including databases like Oracle, Informix, SQLite as well as file formats like Shape, FGDB, MapInfo and more.
Geocode / GeoJSON Multicorn GitHub a collection of PostGIS-related foreign data wrappers
Open Street Map PBF Native GitHub

LDAP Wrappers

Data Source Type Licence Code Install Doc Notes
LDAP Native GitHub PGXN Allows to query an LDAP server and retrieve data from some pre-configured Organizational Unit
LDAP Multicorn PostgreSQL GitHub PGXN documentation


Generic Web Wrappers

Data Source Type Licence Code Install Doc Notes
Git Multicorn PostgreSQL GitHub PGXN
Git Native GitHub
ICAL Multicorn PostgreSQL GitHub pdf
IMAP Multicorn PostgreSQL GitHub PGXN documentation
RSS Multicorn PostgreSQL GitHub PGXN documentation This fdw can be used to access items from an rss feed.
www Native GitHub PGXN wiki Allows to query different web services


Specific Web Wrappers

Data Source Type Licence Code Install Doc Notes
Database.com Multicorn BSD GitHub
DynamoDB Multicorn GPL GitHub
Facebook Multicorn GitHub
Google Multicorn PostgreSQL GitHub PGXN
Heroku dataclips Native GitHub
Mailchimp Multicorn PostgreSQL GitHub Beta
Parse Multicorn MIT GitHub
S3 Native GitHub PGXN
S3CSV Multicorn GPL 3 GitHub This is meant to replace s3_fdw that does is not supported on PostgreSQL version 9.2+
Twitter Native GitHub PGXN A wrapper fetching text messages from Twitter over the Internet and returning a table
Google Spreadsheets Multicorn MIT GitHub

Big Data Wrappers

Data Source Type Licence Code Install Doc Notes
Elastic Search Multicorn github
file_fdw-gds (Hadoop) Native GitHub Hadoop file_fdw is a slightly modified version of PostgreSQL 9.3's file_fdw module.
Hadoop Native GitHub Allows read and write access to HBase as well as to HDFS via Hive.
HDFS Native GitHub
Hive Multicorn GitHub Used to access Apache Hive tables.
Hive / ORC File Native GitHub
Impala Native BSD GitHub

Column-Oriented Wrappers

Data Source Type Licence Code Install Doc Notes
Columnar Store Native github example A Columnar Store for PostgreSQL.
MonetDB Native github

Scientific Wrappers

Data Source Type Licence Code Install Doc Notes
ROOT files Native GitHub https://root.cern.ch
VCF files (Genotype) Multicorn GitHub http://en.wikipedia.org/wiki/Variant_Call_Format

Operating System Wrappers

Data Source Type Licence Code Install Doc Notes
Docker Multicorn GitHub
Log files Multicorn GitHub
OpenStack / Telemetry Multicorn GitHub
OS Query Multicorn GitHub Like Facebook's OSQuery, but for Postgres
Process Multicorn GitHub A foreign datawrapper for querying system stats based on statgrab

Exotic Wrappers

Data Source Type Licence Code Install Doc Notes
fdw_fdw Multicorn GitHub the Meta FDW ! reads this page and returns the list of all the FDW
PGStrom Native wiki uses GPU devices to accelarate sequential scan on massive amount of records with complex qualifiers.
PPG Native GitHub distributed parallel query engine, based on fdw and hooks of PG
Open Civic Data Multicorn GitHub
Phillips Hue Lighting Systems Multicorn MIT GitHub
Random Number Multicorn GitHub A random number generator foreign data wrapper for postgres
Template Tables Native GitHub PostgreSQL data wrapper for template tables - any DML and SELECT operations are disallowed

Example Wrappers

Data Source Type Licence Code Install Doc Notes
Dummy Native BSD GitHub Readable null FDW for testing
Hello World GitHub
Black Hole bitbucket a skeleton FDW pre-populated with relevant excerpts from the documentation


Writing Foreign Database Wrappers

Personal tools