Skip to content

Conversation

@dfalbel
Copy link
Contributor

@dfalbel dfalbel commented Nov 18, 2025

Addresses #10432

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

Creating a Redshift connection require some configuration, and there are possibly multiple different ways to setup authentication dependning on how the Redshift cluster is set.

The way that worked for me is:

  1. Set up awscli, (we have some internal instructions ) then run:
aws sso login --profile <profile>

The profile must have access to the Redshift cluster that you plan to use.

  1. Setting up a Redshift cluster:

The easiest way to setup a Redshift Cluster is creating a Serverless Redshihft cluster.
Go to the AWS dashboard -> AWS Redshift -> Serverless Dashboard -> Create Workgroup

Follow the steps. Remember to use only public security groups if you want to be able to access it locally.

After creating the workgroup, you should be able to acess the query editor from the AWS console. Make sure you can make some queries from there.

You'll also be able to find the workgrourp endpoint in the workgroup dashboard. This is what is used for the connection string.

There may be easier or better ways for this, specially if setting CI jobs. See slack discussion.

  1. Connect from Python

A connection can be created by installing the redshift_connector:

pip install redshift_connector

The create a connection with:

conn: redshift_connector.Connection = redshift_connector.connect(
    iam=True,
    database='dev',
    host='<workgroup endpoint>',
    profile='<profile you setup in 1>'
 )

@:connections

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:connections

readme  valid tags

@dfalbel dfalbel requested a review from Copilot November 21, 2025 12:42
Copilot finished reviewing on behalf of dfalbel November 21, 2025 12:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds AWS Redshift support to the Connections Pane, allowing users to connect to and browse Redshift databases within Positron.

Key Changes:

  • Implemented RedshiftConnection class with support for listing databases, schemas, tables/views, and fields
  • Added comprehensive test coverage for Redshift connections following the established testing patterns
  • Added redshift_connector dependency to test requirements

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
extensions/positron-python/python_files/posit/positron/connections.py Adds RedshiftConnection class with methods for connection management, object listing, and data preview. Updates connection wrapping logic to recognize Redshift connections.
extensions/positron-python/python_files/posit/positron/tests/test_connections.py Adds TestRedshiftConnectionsService class with comprehensive tests for connection registration, data containment checks, icon retrieval, object listing, field listing, and preview functionality.
extensions/positron-python/python_files/posit/test-requirements.txt Adds redshift_connector as a test dependency.
extensions/positron-python/python_files/posit/pinned-test-requirements.txt Pins redshift_connector to version 2.1.10 for Python versions < 3.14.

@dfalbel dfalbel force-pushed the connections/redshift branch 3 times, most recently from 5bf25e3 to 6a68d42 Compare November 26, 2025 13:45
@dfalbel dfalbel marked this pull request as ready for review November 26, 2025 13:49
@dfalbel dfalbel requested a review from isabelizimm November 26, 2025 14:36
@dfalbel dfalbel force-pushed the connections/redshift branch 2 times, most recently from 0ecd0f6 to ff609c0 Compare November 26, 2025 19:01
@dfalbel dfalbel force-pushed the connections/redshift branch from ff609c0 to 4bbca37 Compare November 27, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants