ADBC support?

Ouverte
#5,814 0 commentaires 5 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 4 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
Calme
Stack technique
python
Domaine
databases

Piste de recherche

Start by reading the existing engine adapters and comparing their database connection interfaces and dependencies. Then assess how an ADBC-based connection would fit the adapters and fetchdf path; the issue does not identify specific files or tests. Done would mean defining a concrete ADBC support scope, including which drivers and behaviors are supported.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Improvement

Hi! Thanks for creating this project!

I am wondering, have you considered supporting ADBC as a connecting interface towards the different databases? ADBC is relatively new, but read for production imo. I think introducing ADBC would:

  1. simplify the codebase, and ease the maintenance of the several engine adapters, as they share the similar dbapi interface and have less non-shared dependencies.
  2. improve the preformance of fetchdf when moving large amounts of data.
  3. allow a BYOD (bring your own driver) approach.

Some pointers:
https://arrow.apache.org/adbc/current/python/recipe/postgresql.html#using-pandas-and-adbc
https://docs.adbc-drivers.org/drivers/bigquery/index.html

The difference between for example BigQuery, Databricks and DuckDB Quack and Trino then becomes:

from adbc_driver_manager import dbapi

dbapi.connect(
    driver="bigquery" # driver="databricks" or driver="quack" or driver="trino"
    db_kwargs={
       # these can be passable via the config and vary per database and user requirements
       # "uri": "quack://localhost:9494/?token=quack-secret"
    },
)

I think it would simplify managing models in multiple databases/datalakes, and enhances/leverage the existing power of SQLGlot even more.

I'd have to dive deeper into the code to figure out the overall impact on the codebase though.

Langage dominant
Python
Étoiles
3.3k
Forks
471
Merge moyen
6 j 7 h
PR mergées (30 j)
35

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de SQLMesh/sqlmesh

Toutes les issues de SQLMesh/sqlmesh

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.