Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rough implementation of DBAPI & sqlalchemy dialect #1303

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

charlesbluca
Copy link
Collaborator

Definitely needs some work, but at the moment this enables us to query tables in a pre-populated dask_sql.Context through sqlalchemy with something like:

import dask.config

from dask_sql import Context
from dask.datasets import timeseries

from sqlalchemy import text

dask.config.set({"dataframe.convert-string": False})

c = Context()

c.create_table("df", timeseries())

with c.sqlalchemy_connection() as conn:
   result = conn.execute(text("select * from df where name = 'Alice'")).fetchall()

cc @randerzander @jdye64

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2024

Codecov Report

Attention: 160 lines in your changes are missing coverage. Please review.

Comparison is base (c274609) 83.12% compared to head (fb6e77d) 82.45%.

Files Patch % Lines
dask_sql/integrations/dbapi.py 0.00% 138 Missing ⚠️
dask_sql/integrations/sqlalchemy.py 0.00% 17 Missing ⚠️
dask_sql/context.py 16.66% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1303      +/-   ##
==========================================
- Coverage   83.12%   82.45%   -0.68%     
==========================================
  Files          77       79       +2     
  Lines        4261     4422     +161     
  Branches      795      814      +19     
==========================================
+ Hits         3542     3646     +104     
- Misses        550      607      +57     
  Partials      169      169              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

2 participants