Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Executes SQL commands from STDIN in a single transaction

Project description

This tool accepts either a Redshift username and password OR an AWS Access Key ID and Secret Key.

If you use the IAM Access/Secret method, the user that you are referencing MUST have the correct policy to get temporary credentials from the database. For example:

  "Version": "2012-10-17",
  "Statement": {
    "Effect": "Allow",
    "Action": "redshift:GetClusterCredentials",
    "Resource": "arn:aws:redshift:us-west-2:123456789012:dbuser:examplecluster/temp_creds_user"


python -m redshiftsql –password –port –file


python -m redshiftsql –aws-access-key-id –aws-secret-key –cluster-name –port –file


  • host The Redshift endpoint, minus the port
  • dbname The Redshift database to connect to
  • user The Redshift user
  • password The Redshift password. Ignored if aws-access-key-id is present
  • port The port on the host. Defaults to 5439
  • file The file to read the SQL commands from. If not present, the commands will be read from stdin
  • aws-access-key-id The AWS Access Key ID for the IAM user to obtain temporary credentials
  • aws-secret-key The AWS Secret Key for the IAM user to obtain temporary credentials
  • cluster-name The Redshift cluster name to obtain temporary credentials from

Project details

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


History Node


This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
redshiftsql-0.0.1-py2.py3-none-any.whl (5.2 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Mar 14, 2018
redshiftsql-0.0.1.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Mar 14, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page