Skip to content
/ sqs_fdw Public

PostgreSQL Foreign Data Wrapper for Amazon SQS

License

Notifications You must be signed in to change notification settings

dcalde/sqs_fdw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL Foreign Data Wrapper for Amazon SQS

This Foreign Data Wrapper (FDW) allows to receive messages from and send to Amazon Simple Message Service (SQS) via SELECT and INSERT.

Dependencies

This FDW requires the Multicorn extension to be installed.

pip install pgxnclient
pgxn install multicorn

Installation

python setup.py install
CREATE EXTENSION IF NOT EXISTS multicorn;

CREATE SERVER IF NOT EXISTS multicorn_sqs 
    FOREIGN DATA WRAPPER multicorn
OPTIONS (
    wrapper 'sqs_fdw.SQSForeignDataWrapper'
);

CREATE FOREIGN TABLE multicorn_test (
    message_id uuid,
    test character varying,
    test2 int,
    message_attributes jsonb
) SERVER multicorn_sqs OPTIONS (
    aws_access_key_id '',
    aws_secret_access_key '',
    aws_region 'ap-southeast-2',
    queue_url 'https://sqs.*',
    message_attributes 'foo,bar'
);

Usage

INSERT INTO multicorn_test (test, test2)
VALUES ('a', 1), ('b', 2);

SELECT * FROM multicorn_test;

Licence

MIT

About

PostgreSQL Foreign Data Wrapper for Amazon SQS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages