S3ToRedshift
Connector to upload csv/csv gzip file from S3 bucket into Redshift table.
Install with pip
$ pip install S3ToRedshift
Usage
-
Import the library.
from S3ToRedshift import S3ToRedshift
-
Create an instance by defining aws access credentials, redshift credentials and region name. These parameters might not be needed, depending on the machine"s access rights.
s3_to_redshift = S3ToRedshift( aws_access_key_id="##########", aws_secret_access_key="##########", aws_region_name="##########", host="##########", user="##########", password="##########", dbname="##########", port="##########", iam_role="##########" )
-
The imported module has several functions. Please refer to respective help for more information.
s3_to_redshift.upload_csv(schema_name, table_name, bucket_name, object_name, file_type, if_exists, csv_sep, csv_null_identifier)
© 2020, Samyak Ratna Tamrakar.