PostgreSQL外部数据源访问接口 Multicorn

未知
C/C++ Python
Linux
2012-04-23
红薯

Multicorn 是一个 PostgreSQL 9.1+ 的扩展模块,用于简化外部数据封装开发,允许开发者使用 Python 编程语言开发。

特性:

  • Multicorn 允许你访问 PostgreSQL 数据库的任何数据源
  • 你可以使用强大的SQL来查询数据
  • 任何SQL工具都可以在这些数据源上重用

支持的数据源包括:

  • oracle_fdw – connects to Oracle databases.
  • mysql_fdw – connects to MySQL databases.
  • tds_fdw – connects to Sybase and Microsoft SQL Server databases.
  • odbc_fdw – connects to any ODBC source.
  • couchdb_fdw – connects to CouchDB databases.
  • redis_fdw – connects to Redis databases.
  • twitter_fdw – fetches messages from Twitter.
  • ldap_fdw – queries LDAP servers.
  • file_fdw – access data files in the server’s file system and query them as tables.
  • file_fixed_length_record_fdw – reads flat files with columns of fixed width.
  • PGStrom – uses GPU devices to accelerate sequential scan on massive amount of records with complex qualifiers.
  • s3_fdw – reads files located in Amazon S3.
  • www_fdw – accesses web services as a data source.

示例代码:

create foreign table gmail (
    "Message-ID" character varying,
    "From" character varying,
    "Subject" character varying,
    "payload" character varying,
    "flags" character varying[],
    "To" character varying) server multicorn_imap options (
        host 'imap.gmail.com',
        port '465',
        payload_column 'payload',
        flags_column 'flags',
        ssl 'True',
        login 'mylogin',
        password 'mypassword'
);

select flags, "Subject", payload  from gmail where "From" like 'pgsql-%'
and "Subject" like '%Daily digest%' limit 2;
加载中

评论(0)

暂无评论

暂无资讯

暂无问答

初识Postgresql和Sqoop

最近在玩Hadoop、Hive、PostgreSql,因此结合上一篇文档记录一下本周工作内容,主要是环境的搭建和配置以及数据的生成与导入导出:在VirtualBox中安装CentOS6.4,并且搭建Hadoop1.2.1和Hive0...

2013/12/01 22:30
4.9K
3

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部