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

feat(python): support use of KùzuDB via pl.read_database #14822

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
alexander-beedie committed Mar 3, 2024

Verified

This commit was signed with the committer’s verified signature.
shlomi-noach Shlomi Noach
commit c89d9a5f516ffab08949c49dc32f51484b0b2b54
11 changes: 7 additions & 4 deletions py-polars/tests/unit/io/test_database_read.py
Original file line number Diff line number Diff line change
@@ -9,17 +9,19 @@
from types import GeneratorType
from typing import TYPE_CHECKING, Any, NamedTuple

import polars as pl
import pytest
from polars.exceptions import UnsuitableSQLError
from polars.io.database import _ARROW_DRIVER_REGISTRY_
from polars.testing import assert_frame_equal
from sqlalchemy import Integer, MetaData, Table, create_engine, func, select
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql.expression import cast as alchemy_cast

import polars as pl
from polars.exceptions import UnsuitableSQLError
from polars.io.database import _ARROW_DRIVER_REGISTRY_
from polars.testing import assert_frame_equal

if TYPE_CHECKING:
import pyarrow as pa

from polars.type_aliases import (
ConnectionOrCursor,
DbReadEngine,
@@ -650,6 +652,7 @@ def test_read_kuzu_graph_database(tmp_path: Path, io_files_path: Path) -> None:

users = str(io_files_path / "graph-data" / "user.csv").replace("\\", "/")
follows = str(io_files_path / "graph-data" / "follows.csv").replace("\\", "/")

conn.execute(f'COPY User FROM "{users}"')
conn.execute(f'COPY Follows FROM "{follows}"')