Coder Social home page Coder Social logo

skyformat99 / influxdb_fdw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgspider/influxdb_fdw

0.0 2.0 0.0 53 KB

InfluxDB Foreign Data Wrapper for PostgreSQL. We are developing the FDW module now. Coming soon.

License: Other

Makefile 0.93% C 88.00% C++ 4.22% Shell 0.07% Go 6.77%

influxdb_fdw's Introduction

InfluxDB Foreign Data Wrapper for PostgreSQL

This PostgreSQL extension is a Foreign Data Wrapper (FDW) for InfluxDB.

The current version can work with PostgreSQL 9.6 and 10.

Installation

Install InfluxDB Go client library

go get github.com/influxdata/influxdb/client/v2

Add a directory of pg_config to PATH and build and install influxdb_fdw.

make USE_PGXS=1
make install USE_PGXS=1

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

make
make install

Usage

Load extension

CREATE EXTENSION influxdb_fdw;

Create server

CREATE SERVER influxdb_server FOREIGN DATA WRAPPER influxdb_fdw OPTIONS
(dbname 'mydb', host 'http://localhost', port '8086') ;

Create user mapping

CREATE USER MAPPING FOR CURRENT_USER SERVER influxdb_server OPTIONS(user 'user', password 'pass');

Create foreign table

You need to declare a column named "time" to access InfluxDB time column.

CREATE FOREIGN TABLE t1(time timestamp with time zone , tag1 text, field1 integer) SERVER influxdb_server OPTIONS (table 'measurement1');

Or you can use import foreign schema

IMPORT FOREIGN SCHEMA public FROM SERVER influxdb_server INTO public;

Access foregin table

SELECT * FROM t1;

Features

  • Only SELECT queries are supported.

Limitations

  • WHERE clauses are not pushed down to InfluxDB in current version.

License

Copyright (c) 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.

influxdb_fdw's People

Contributors

mochizk avatar kanegoon avatar

Watchers

skyformat99 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.