Skip to main content

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"
  }
}

Usage

python -m redshiftsql –password –port –file

OR

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

Arguments

  • 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


Download files

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

Source Distribution

redshiftsql-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redshiftsql-0.0.1-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file redshiftsql-0.0.1.tar.gz.

File metadata

  • Download URL: redshiftsql-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redshiftsql-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6ed38597a8c033c35f5dc6b691e937b25c9b024bfc5d490ee59dcc612cad345c
MD5 e681a0751ecf94f11cc82c39c11c5b70
BLAKE2b-256 25ea5149b166de92333482d98cecb7968ab4e414b6f4c729d60b14f904733118

See more details on using hashes here.

File details

Details for the file redshiftsql-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for redshiftsql-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1be6aeaa8edf52ffb67cb603b2df0c5f9bddf3c45899f14a7124126bc7acdc89
MD5 8fd7e4d833edf9be23b9c22d00208e47
BLAKE2b-256 639dab78e07f71d5c980bd19ebed18ce571a9935593b2d61879b7a2ef9a53063

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page