This repository was archived by the owner on Mar 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.sql
executable file
·69 lines (63 loc) · 1.64 KB
/
example.sql
1
drop extension multicorn cascade;CREATE EXTENSION multicorn;CREATE SERVER multicorn_srv_post FOREIGN DATA WRAPPER multicornoptions ( 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 post ( profilepk_pro_id int, pos_orgid text, luence text, pos_authororgid text, pos_dateinsert timestamp, pos_dateupdate timestamp, pos_isadmin boolean, pos_isdeleted boolean, pos_lang text, pos_level int, pos_mark decimal, pos_marktype int, pos_markvalue decimal, pos_message text, pos_messagedatecreate timestamp, pos_messagedateupdate timestamp, pos_normalizemessage text, pos_parentorgid text, pos_shares int, pos_show int, pos_strong int, pos_url text, post_spelling_status int, runpk_run_id int, sourcepk_src_id int) SERVER multicorn_srv_post;CREATE SERVER multicorn_srv_auth FOREIGN DATA WRAPPER multicornoptions ( wrapper 'pgCassandra.CassandraFDW', port '9042', columnfamily 'author', keyspace 'social_postsdata', hosts '10.233.41.11,10.233.41.12,10.233.41.13');CREATE FOREIGN TABLE author( aut_orgid text, sourcepk_src_id int, aut_avatarurl text, aut_dateinsert timestamp, aut_dateupdate timestamp, aut_firstname text, aut_lastname text, aut_locale text, aut_middlename text, aut_profileurl text, aut_sex text) SERVER multicorn_srv_auth;select * from post where profilepk_pro_id = 4736;select * from post JOIN author ON aut_orgid = pos_authororgid where profilepk_pro_id = 4736;