Examples¶
SQLAlchemy-Exasol contains the following examples which are regularly verified in the CI to be correct. For a broader introduction and an overview, please see:
For details, please look at the docstrings and comments in the source code of the examples.
Pre-requisites¶
Poetry >= 2.1.0
Preparation¶
Note
The example scripts provided here use a centralized configuration & custom classes and functions to reduce their setup. For a simpler and direct SQLAlchemy approach, see the example code in First Step and Connection Specification.
Some basic preparation steps are required to see the examples in action:
Download the SQLAlchemy-Exasol source code.
Inside the folder where you have SQLAlchemy-Exasol’s source code, install the dependencies using:
poetry install- Make sure you have installed or have access to an Exasol database. For testing purposes, you may use:
exasol/docker-db, which can be easily accessed by using
poetry run -- nox -s db:startthe free Exasol Community Edition
Open the
/examples/directory and edit the file configuration file, as described in Connection Configuration.To verify that your connection configuration is correct, run the code, as described in Testing your Connection.
Now, you may run whatever examples you would like:
poetry run -- python examples/<path_to_desired_module>.py