Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

wjch-krl/pgCassandra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pgCassandra

1. Installation

a) Install Multicorn

http://multicorn.readthedocs.org/en/latest/installation.html

b) Install python cassandra driver
pip install cassandra-driver
c) Download pgCassandra:
git clone https://github.com/wjch-krl/pgCassandra
cd pgCassandra
d) Install extension
python setup.py install

2. Usage

--Create extension and server
CREATE EXTENSION multicorn;
CREATE SERVER multicorn_srv FOREIGN DATA WRAPPER multicorn
options (
  wrapper 'pgCassandra.CassandraFDW',
   port '9042',
   columnfamily 'post',
   keyspace 'social_postsdata',
   hosts '10.233.41.11,10.233.41.12,10.233.41.13'
);

--Create foreign table
CREATE FOREIGN TABLE messages (
    id text,
    luence text,
    message text,
    datecreate timestamp
) 
SERVER multicorn_srv;

--Query created table
Select * from messages where id = '123124';

3. Feateures

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages