Sign inSign up

wariosantos/postgres_aws_s3

By wariosantos

•Updated about 2 years ago

This image simulates the AWS RDS environment, allowing COPY of files from S3 into PostgreSQL.

Image
Developer tools
Data science
Databases & storage
0

1.2K

wariosantos/postgres_aws_s3 repository overview

⁠COPY files directly from an S3 bucket to a table in PostgresSQL:

Example:

CREATE EXTENSION plpython3u;
CREATE EXTENSION aws_s3;

CREATE TABLE public.download_file (
    id          serial primary key,
    code        varchar,
    name        varchar,
    status      varchar,
);

SET aws_s3.endpoint_url TO 'http://minio:9000';

SELECT aws_s3.table_import_from_s3(
               'download_file',
               'code,name,status',
               '(FORMAT CSV, DELIMITER ",", HEADER true)',
               ('database_name', 'sample.csv', ''),
               ('ACESSKEY', 'SECRETKEY', '')
       );

⁠For more informations and credits: https://github.com/chimpler/postgres-aws-s3⁠

Tag summary

Content type

Image

Digest

sha256:8c181368b…

Size

341.1 MB

Last updated

about 2 years ago

docker pull wariosantos/postgres_aws_s3