http://multicorn.readthedocs.org/en/latest/installation.html
pip install cassandra-driver
git clone https://github.com/wjch-krl/pgCassandra
cd pgCassandra
python setup.py install
--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';
- Automatic index dicovery - query is pushed to cassandra only if it can be performed
- Custom indexes support (e.g https://github.com/Stratio/cassandra-lucene-index.git)