Skip to content

S3 CSV Foreign Data Wrapper Using Multicorn

License

Notifications You must be signed in to change notification settings

hydradatabase/s3csv_fdw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 CSV Foreign Data Wrapper for PostgreSQL

This data wrapper adds the ability to perform 'select *' queries on CSV files stored on the Amazon S3 file system. This is meant to replace s3_fdw which is not supported on PostgreSQL version 9.2+.

Install multicorn

First you need to install it (last command might need a sudo).

Then activate multicorn extension in your pg database

Create Foreign Data Wrapper

Just paste this code to create server

Create Foreign Table

Replace the example fields with your info...

Example:

Add user credentials

Store your aws credentials into a PostgreSQL user mapping.

Example:

Perform queries

You have a PostgreSQL table now, for now, only read queries are working.

Credits

Christian Toivola (dev360) wrote the code and submitted it as Multicorn request here (Segfault-Inc/Multicorn#49). I just packaged it up.

About

S3 CSV Foreign Data Wrapper Using Multicorn

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.6%
  • Shell 4.4%