Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ updates:
- "*"
exclude-patterns:
- "sqlalchemy"
- "turbodbc"

2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Build Artifacts
run: poetry build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Check Tag Version
# make sure the pushed/created tag matched the project version
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Check Version(s)
run: poetry run -- nox -s version:check
Expand All @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Build Documentation
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Run changelog update check
run: poetry run -- nox -s changelog:updated
Expand All @@ -78,7 +78,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -131,7 +131,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -155,7 +155,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Run format check
run: poetry run -- nox -s project:format
Expand All @@ -171,7 +171,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Run Distribution Check
run: poetry run -- nox -s package:check
Expand All @@ -191,7 +191,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Build Documentation
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Generate matrix
run: poetry run -- nox -s matrix:all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-exasol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Generate matrix
run: poetry run -- nox -s matrix:exasol
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Generate matrix
run: poetry run -- nox -s matrix:python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3

- name: Download Artifacts
uses: actions/download-artifact@v6
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
contents: read

tests:
name: Integration-Tests (${{matrix.connector}}, Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
name: Integration-Tests (Python-${{ matrix.python-version }}, test:${{ matrix.integration-group }}, Exasol-${{ matrix.exasol-version}}, ${{matrix.connector}})
needs: [ build-matrix ]
runs-on: ubuntu-24.04
permissions:
Expand All @@ -27,21 +27,24 @@ jobs:
uses: actions/checkout@v5

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v1
uses: exasol/python-toolbox/.github/actions/python-environment@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install via apt
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev
- name: Start test db
run: poetry run -- nox -s db:start -- --db-version ${{ matrix.exasol-version }}

- name: Run Tests and Collect Coverage
run: |
export SQLALCHEMY_WARN_20=1
poetry run -- nox -s test:integration -- --coverage --db-version ${{ matrix.exasol-version }}
poetry run -- nox -s test:${{ matrix.integration-group }}

- name: Upload Artifacts
uses: actions/upload-artifact@v5
with:
name: coverage-python${{ matrix.python-version }}-${{matrix.connector}}-exasol${{ matrix.exasol-version }}slow
name: coverage-python${{ matrix.python-version }}-${{ matrix.integration-group }}-exasol${{ matrix.exasol-version }}-${{matrix.connector}}-slow
path: .coverage
include-hidden-files: true

- name: Stop test db
run: poetry run -- nox -s db:stop
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.lint*
.test-results.db
.html-documentation
odbcconfig/odbcinst.ini

_build/

Expand Down
28 changes: 4 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SQLAlchemy Dialect for EXASOL DB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SQLAlchemy Dialect for Exasol
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


.. image:: https://github.com/exasol/sqlalchemy-exasol/actions/workflows/pr-merge.yml/badge.svg?branch=master&event=push
Expand Down Expand Up @@ -42,32 +42,13 @@ SQLAlchemy Dialect for EXASOL DB
:target: https://pypi.org/project/sqlalchemy_exasol
:alt: PyPI - Downloads


Getting Started with SQLAlchemy-Exasol
--------------------------------------
SQLAlchemy-Exasol supports multiple dialects, primarily differentiated by whether they are ODBC or Websocket-based.

Choosing a Dialect
++++++++++++++++++

We recommend using the Websocket-based dialect due to its simplicity.
ODBC-based dialects demand a thorough understanding of (Unix)ODBC, and the setup is considerably more complex.

.. warning::

The maintenance of Turbodbc & pyodbc support is currently paused, and it is planned to be phased out in future versions.

SQLAlchemy-Exasol supports a Websocket-based dialect for interacting with an Exasol database.

System Requirements
-------------------
- Exasol >= 7.1 (e.g. `docker-db <test_docker_image_>`_ or a `cloud instance <test_drive_>`_)
- Exasol >= 7.1 (e.g. `docker-db <test_docker_image_>`_ or a `Exasol SaaS instance <test_drive_>`_)
- Python >= 3.10

.. note::

For ODBC-Based Dialects, additional libraries required for ODBC are necessary
(for further details, checkout the `developer guide`_).

Features
--------

Expand All @@ -80,5 +61,4 @@ Check out sqlalchemy-exasols's [User Guide(https://exasol.github.io/sqlalchemy-e

.. _developer guide: https://github.com/exasol/sqlalchemy-exasol/blob/master/doc/developer_guide/developer_guide.rst
.. _test_docker_image: https://github.com/exasol/docker-db
.. _odbc_driver: https://docs.exasol.com/db/latest/connect_exasol/drivers/odbc/odbc_linux.htm
.. _test_drive: https://cloud.exasol.com/signup
43 changes: 43 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
# Unreleased

In this release, SQLAlchemy-Exasol has been updated to work with
SQLAlchemy 2.x. For details on what SQLAlchemy 2.x brings and changes
needed in your projects, please check out the following links:
* [What's New in 2.0](https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html)
* [Major Migration Guide for 2.0](https://docs.sqlalchemy.org/en/20/changelog/migration_20.html)

Additionally, the ODBC-based dialects pyodbc and Turbodbc, which had been marked as
deprecated, were dropped. Please switch over to using the websocket dialect.
Connection strings should be altered to start with `exa+websocket://`.

## Refactoring

- #621: Added `future=true` to `create_engine` to use the 2.0 API
- #623: Started switch to `sqlalchemy` 2.x (CI tested with 2.0.43)
- All unit, `exasol`, and `regression` tests are working
- Several tests from `sqlalchemy` are failing, have been marked as skipped, and require investigation
- Reinstated the ArgSignatureTest which ensures that all visit_XYZ() in `_sql.Compiler` subclasses have `**kw`
- #626: Reinstated `sqlalchemy` tests:
- `TrueDivTest.test_floordiv_integer` and `TrueDivTest.test_floordiv_integer_bound` by providing an override in `EXACompiler.visit_floordiv_binary`
- `TrueDivTest.test_truediv_numeric` by providing `ExaDecimal` to the `EXADialect_pyodbc.colspecs` list
- a few tests from `ComponentReflectionTest` as `define_reflected_tables` is overridden based on what Exasol supports
- #631: Updated `EXADialect.has_table` to search for both tables and views, fixed passing of schema=None to dialect methods, and reinstated `sqlalchemy` tests:
- `ReturningGuardsTest` are used to indicate that the Exasol dialect, which does not natively support the [RETURNING clause](https://docs.sqlalchemy.org/en/20/glossary.html#term-RETURNING), is set up per the API specifications
- `ComponentReflectionTest.test_not_existing_table` is used to indicate that specific `EXADialect` methods (i.e. `get_columns`) check to see if the requested table/view exists and if not, they will now toss a `NoSuchTableError` exception
- #403: Dropped support for Turbodbc
- #404: Dropped support for pyodbc
- #654: Reinstated `sqlalchemy` tests after minor modifications to work for Exasol:
- `ComponentReflectionTest.test_get_multi_columns`
- `ComponentReflectionTest.test_get_multi_foreign_keys`
- `ComponentReflectionTest.test_get_multi_pk_constraint`
- `ComponentReflectionTest.test_get_view_definition_does_not_exist`
- #652: Reinstated `sqlalchemy` tests after minor modifications to work for Exasol:
- `HasTableTest.test_has_table_cache`
- `RowCountTest.test_non_rowcount_scenarios_no_raise`
- #658: Updated to `exasol-toolbox` 3.0.0

## Documentation
- #660: Updated User Guide
- Added Getting Started, Security, & Engine Configuration pages
- Cleaned up index and README.rst
- #663: Updated developer documentation
- #653: Updated User Guide for accessing Exasol SaaS instances.
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@
linkcheck_allowed_redirects = {
# All HTTP redirections from the source URI to
# the canonical URI will be treated as "working".
r"https://github\.com/.*": r"https://github\.com/login*"
r"https://github\.com/.*": r"https://github\.com/login*",
r"https://exasol\.my\.site\.com/s/article/.*": r"https://exasol\.my\.site\.com/s/article/.*?language=en_US",
}
Loading