Investigate Amazon Redshift support (provisioned and serverless)

Aperta
#892 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
aws, csharp, postgresql
Ambito
database

Direzione di ricerca

Start by reading the existing grate.postgresql provider and its tests, then compare its connection, history, catalog, locking, and transaction assumptions with the Redshift behaviors named in the proposal. Evaluate provisioned and Serverless connectivity, including the Data API option, and record a provider and execution design with supported scope and limitations. Done means a documented decision and a real-target test plan for bootstrap, schema changes, reruns, failures, and concurrency.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Investigate adding Amazon Redshift as a migration target in grate, covering both provisioned clusters and Redshift Serverless. Determine whether it can be supported safely by adapting grate.postgresql or whether it requires a dedicated grate.redshift provider. Also evaluate an optional AWS Redshift Data API execution transport, analogous to the job-based approach proposed for BigQuery in #829.

This is a proposal for discussion rather than a commitment to a specific provider architecture.

Motivation

Redshift is an analytical data warehouse whose SQL syntax and protocol have PostgreSQL roots, but its DDL capabilities, catalog metadata, and operational behavior differ materially from PostgreSQL. Teams may want the same versioned, auditable database changes and script-folder conventions they use with grate for other systems, without assuming PostgreSQL compatibility where it is not guaranteed.

Potential migration use cases include creating and evolving schemas, tables, views, materialized views, and other supported Redshift database objects, plus controlled data transformations.

Proposed discovery / initial scope

  • Compare the existing grate.postgresql provider's bootstrapping, history tables, catalog queries, syntax, locking, and transaction behavior against Redshift.
  • Validate direct PostgreSQL-protocol connectivity and authentication against both provisioned and Serverless endpoints.
  • Evaluate an alternative AWS SDK/.NET-based Redshift Data API transport using ExecuteStatement/DescribeStatement and, where useful, BatchExecuteStatement; assess how asynchronous execution, sessions, idempotency tokens, and cancellation map to grate's IDatabase contract.
  • Determine the correct handling for one-time, anytime, every-time, and environment scripts, including script splitting and error reporting.
  • Persist migration history and failure details in a dedicated schema or otherwise appropriate Redshift objects; verify permissions and concurrent migration behavior.
  • Verify DDL transaction behavior per operation rather than assuming PostgreSQL semantics; define recovery rules for partially applied scripts.
  • Document prerequisites, IAM/Secrets Manager or database authentication options, configuration, and costs.
  • Add integration tests against real Redshift Provisioned and Serverless targets, with credentials supplied securely by the test environment.

Design questions

  1. Is a compatibility layer on top of grate.postgresql sufficient, or are there enough differences to justify grate.redshift?
  2. Should a Redshift Data API transport be a separate provider, an optional execution backend, or a later enhancement?
  3. Which DDL commands are transactional, and how should grate handle commands requiring execution outside an explicit transaction?
  4. What history-table/locking strategy avoids concurrent runners applying the same change?
  5. How should asynchronous requests be resumed or reconciled after a timeout or client crash, avoiding duplicate execution?
  6. Which objects and features should the first version support (internal schemas/tables/views only versus external schemas, Spectrum, datashares, materialized views, etc.)?
  7. How would a Redshift implementation fit with a proposed separation of migration targets, execution transports, and database semantics?

Suggested acceptance criteria for an initial implementation

  • A documented decision is made on PostgreSQL provider reuse versus a dedicated Redshift provider.
  • The basic test workflow runs against at least one real Redshift target: bootstrap history, apply initial table DDL, apply a second schema change, and re-run without repeating successful one-time scripts.
  • Failures, partial application, retries, and concurrency are handled or explicitly documented as limitations.
  • At least provisioned and Serverless connectivity are evaluated; unsupported modes are clearly documented.
  • Provider-specific differences from PostgreSQL are covered by tests and documentation.

Non-goals (initial)

  • Provisioning Redshift clusters/workgroups or managing infrastructure as code.
  • Migrating data stored in S3 directly or managing AWS Glue catalogs independently of a Redshift execution target.
  • Assuming generic PostgreSQL DDL or transactional behavior is automatically valid for Redshift.
  • Supporting every Redshift administrative object in the first iteration.

Related work

Discussion proposal: validate the smallest useful integration before deciding on a new NuGet provider package.

Lingua principale
C#
Stelle
305
Fork
59
Merge medio
1g 27m
PR unite (30g)
79

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di grate-devs/grate

Tutte le issue di grate-devs/grate

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.