ADBC support?

Aperta
#5,814 0 commenti 5 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

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
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
databases

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Python
Stelle
3.3k
Fork
471
Merge medio
6g 7h
PR unite (30g)
35

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 SQLMesh/sqlmesh

Tutte le issue di SQLMesh/sqlmesh

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.