About 15,300 results
Open links in new tab
  1. Using the Amazon Redshift Data API - Amazon Redshift

    • With the Data API, you can programmatically access Amazon Redshift data with web services–based applications, including AWS Lambda, Amazon SageMaker AI notebooks, and AWS Cloud9. For more inform… See more

    Mapping JDBC …

    The following table maps Java Database Connectivity (JDBC) data types to the data types you specify in Data API calls. String values are passed to the Amazon Redshift database and implicitly converted into a database data type.

    AWS Documentation
    Running SQL Statements wit…

    You can control the SQL text submitted to the database engine by calling the Data API operation using parameters for parts of the SQL statement. Named parameters provide a flexible way to pass in parameters without hardcoding them in the SQL text. They help you reuse SQL text and avoid SQL injection problems. The following example shows the named p...

    AWS Documentation
    Fetching The Results of SQL …

    You use different Data API operations to fetch SQL results depending on the result format. When you call ExecuteStatement and BatchExecuteStatement operations, you can specify whether the results are formatted as JSON or CSV. If you don't specify, the default is JSON. To retrieve JSON results, use the GetStatementResult operation. To retrieve CSV r...

    AWS Documentation
  1. The Amazon Redshift Data API simplifies running SQL queries on Redshift clusters without managing database connections. Below are the steps to execute queries using the Redshift Data API.

    1. Prerequisites

    • Ensure your Redshift cluster is set up and accessible.

    • Use AWS Secrets Manager to store database credentials securely.

    • Attach the AmazonRedshiftDataFullAccess policy to your IAM role.

    2. Execute a Query Using AWS CLI

    You can run SQL queries directly via the AWS CLI using the execute-statement command.

    aws redshift-data execute-statement \
    --cluster-identifier <ClusterIdentifier> \
    --database <DatabaseName> \
    --secret-arn <SecretARN> \
    --sql "SELECT * FROM your_table LIMIT 10;"
    Copied!
    • Replace <ClusterIdentifier>, <DatabaseName>, and <SecretARN> with your cluster details and secret ARN.

    3. Execute a Query Using Python (Boto3)

    To programmatically run queries, use the boto3 library in Python.

    Feedback
  2. GitHub - aws/amazon-redshift-python-driver: Redshift …

    53 rows · May 11, 2023 · redshift_connector is the Amazon Redshift connector …

    • BOOLEAN: bool
    • FLOAT4: float
    • DATE: time.date
    • FLOAT8: float
    • NAMETYPEDESCRIPTIONDEFAULT VALUE
      access_key_idstrThe access key for the IAM role or IAM ...None
      allow_db_user_overrideboolTrue specifies the driver uses the DbUser ...FALSE
      app_namestrThe name of the IdP application used for ...None
      auth_profilestrThe name of an Amazon Redshift ...None
      See all 53 rows on github.com
  3. redshift-connector · PyPI

    53 rows · Feb 1, 2013 · redshift_connector is the Amazon Redshift connector for …

    • BOOLEAN: bool
    • FLOAT4: float
    • DATE: time.date
    • FLOAT8: float
    • NAMETYPEDESCRIPTIONDEFAULT VALUE
      access_key_idstrThe access key for the IAM role or IAM ...None
      allow_db_user_overrideboolTrue specifies the driver uses the DbUser ...FALSE
      app_namestrThe name of the IdP application used for ...None
      auth_profilestrThe name of an Amazon Redshift ...None
      See all 53 rows on pypi.org