mirror of
https://github.com/dlt-hub/dlt.git
synced 2025-12-17 19:31:30 +00:00
fixes arrow import in sql_database (#3411)
* fixes pyarrow import in sql_database * bumps to 1.19.1 * linter fix * fixes common workflow
This commit is contained in:
9
.github/workflows/test_common.yml
vendored
9
.github/workflows/test_common.yml
vendored
@@ -104,13 +104,20 @@ jobs:
|
||||
- name: Run common tests with minimum dependencies
|
||||
run: |
|
||||
pytest tests/common tests/normalize tests/reflection tests/plugins tests/load/test_dummy_client.py tests/extract/test_extract.py tests/extract/test_sources.py tests/pipeline/test_pipeline_state.py ${{ matrix.pytest_args }}
|
||||
|
||||
- name: Install min dependencies to import core source
|
||||
run: uv sync ${{ matrix.uv_sync_args }} --group sentry-sdk --extra sql_database
|
||||
|
||||
- name: Run min dependencies source tests
|
||||
run: |
|
||||
pytest tests/sources/test_minimal_dependencies.py ${{ matrix.pytest_args }}
|
||||
|
||||
- name: Install duckdb dependencies
|
||||
run: uv sync ${{ matrix.uv_sync_args }} --extra duckdb --group sentry-sdk
|
||||
|
||||
- name: Run pipeline smoke tests with minimum deps
|
||||
run: |
|
||||
pytest tests/pipeline/test_pipeline.py tests/pipeline/test_import_export_schema.py ${{ matrix.pytest_args }}
|
||||
pytest tests/pipeline/test_pipeline.py tests/pipeline/test_import_export_schema.py tests/sources/rest_api/integration/ ${{ matrix.pytest_args }}
|
||||
|
||||
- name: Install pyarrow
|
||||
run: uv sync ${{ matrix.uv_sync_args }} --extra duckdb --extra cli --extra parquet --group sentry-sdk
|
||||
|
||||
@@ -22,7 +22,6 @@ from dlt.common.configuration.specs import (
|
||||
configspec,
|
||||
)
|
||||
from dlt.common.exceptions import DltException, MissingDependencyException
|
||||
from dlt.common.libs.pyarrow import cast_date64_columns_to_timestamp
|
||||
from dlt.common.schema import TTableSchemaColumns
|
||||
from dlt.common.schema.typing import TWriteDispositionDict
|
||||
from dlt.common.typing import TColumnNames, TDataItem, TSortOrder
|
||||
@@ -223,13 +222,14 @@ class TableLoader:
|
||||
def _load_rows_connectorx(
|
||||
self, query: SelectClause, backend_kwargs: Dict[str, Any]
|
||||
) -> Iterator[TDataItem]:
|
||||
import pyarrow as pa
|
||||
|
||||
try:
|
||||
import connectorx as cx
|
||||
except ImportError:
|
||||
raise MissingDependencyException("Connector X table backend", ["connectorx"])
|
||||
|
||||
import pyarrow as pa
|
||||
from dlt.common.libs.pyarrow import cast_date64_columns_to_timestamp
|
||||
|
||||
# default settings
|
||||
backend_kwargs = {
|
||||
"protocol": "binary",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "dlt"
|
||||
version = "1.19.0"
|
||||
version = "1.19.1"
|
||||
description = "dlt is an open-source python-first scalable data loading library that does not require any backend to run."
|
||||
authors = [{ name = "dltHub Inc.", email = "services@dlthub.com" }]
|
||||
requires-python = ">=3.9.2, <3.15"
|
||||
|
||||
3
tests/sources/test_minimal_dependencies.py
Normal file
3
tests/sources/test_minimal_dependencies.py
Normal file
@@ -0,0 +1,3 @@
|
||||
def test_import_core_sources() -> None:
|
||||
# import all core sources with minimum deps
|
||||
from dlt.sources import filesystem, sql_database, rest_api
|
||||
Reference in New Issue
Block a user