trinodb / trinodb/trino-python-client

Alembic support for Trino

Open
#287 2 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
439
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Describe the feature

It would be awesome to use Alembic for Trino in order to apply migrations and being able to rollback.
That can help with the CI/CD pipelines without overthinking an in-house solution when the technology is already in place.

Also, the Trino dialect is already implemented so it's a matter to connect the dots between the dialect and the Alembic usage (like the Imp for postgresql as example).

Describe alternatives you've considered

I have been able to use it with a workaround creating an empty implementation with the trino dialect but a proper implementation would be better and more functional:

from alembic.ddl.impl import DefaultImpl


class TrinoImpl(DefaultImpl):
    __dialect__ = 'trino'
Are you willing to submit PR?
  • Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Trino dialect and Alembic's alembic/ddl/postgresql.py implementation, using DefaultImpl and the issue's empty TrinoImpl workaround as context. The work is complete when Alembic can apply and roll back migrations for Trino without the workaround; verify behavior against the project's available tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.