Code Monkey home page Code Monkey logo

griddb_fdw's Introduction

GridDB Foreign Data Wrapper for PostgreSQL

This PostgreSQL extension is a Foreign Data Wrapper (FDW) for GridDB.
This version of griddb_fdw can work for PostgreSQL 9.6, 10 and 11.

1. Installation

griddb_fdw requires GridDB's C client library. This library can be downloaded from the GridDB website on github1.

  1. Preapre GridDB's C client Download GridDB's C client and unpack it into griddb_fdw directory as griddb.
    Build GridDB's C client
    -> gridstore.h should be in griddb_fdw/griddb/client/c/include.
    -> libgridstore.so should be in griddb/bin.

  2. Build and install griddb_fdw Change into the griddb_fdw source directory.

$ make
$ make install

If you want to build griddb_fdw in a source tree of PostgreSQL, use

$ make NO_PGXS=1

2. Usage

load extension

CREATE EXTENSION griddb_fdw;

create server object

CREATE SERVER griddb_svr FOREIGN DATA WRAPPER griddb_fdw OPTIONS(host '239.0.0.1',  
port '31999', clustername 'ktymCluster');

We have to specify the following parameters for a GridDB foreign server:

host : GridDB notification addres.
port : GridDB notification port
clustername : GridDB cluster name

create user mapping

CREATE USER MAPPING FOR public SERVER griddb_svr OPTIONS(username 'admin', password 'testadmin');

We have to specify the following parameters for a user mapping:
username : GridDB username
password : GridDB password

import schema

IMPORT FOREIGN SCHEMA griddb_schema FROM SERVER griddb_svr INTO public;

We can use the following parameters for import schema:
recreate : 'true' or 'false'. If 'true', table schema will be updated.

After schema is imported, we can access tables.

update and delete

The container must have rowkey on GridDB in order to execute update and delete query.

3. Features

  • Supprt SELECT and INSERT
  • Supprt UPDATE and DELETE
  • WHERE clauses are pushdowned

4. Limitations

Nothing.

5. License

Copyright (c) 2017-2018, TOSHIBA Corporation
Copyright (c) 2011 - 2016, EnterpriseDB Corporation

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

See the LICENSE file for full details.

griddb_fdw's People

Contributors

kanegoon avatar t-kataym avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.