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.3.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.3-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for redshiftsql-0.0.3.tar.gz
Algorithm Hash digest
SHA256 cd6218c74dcdd8b5b782140d0546d22f4931be6b3529f1a469e3c060e1991930
MD5 8f5b066719ca4e2564a559198993d143
BLAKE2b-256 57c498733771bab9a6bfb26a9a6dd17afa1a294dc1ba2ef24cc617f70a53851e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for redshiftsql-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a5095cb6278a4c1b59e199f6d797a9b940ef85af3544690d0667febe4a891cea
MD5 9e704c83b3ac5356e8bb000f7621c8c8
BLAKE2b-256 f258f081cf58521db31d317b9328710f35f69b45d862bae156eedfd48a624fcb

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