All Projects → blue-yonder → sqlalchemy_exasol

blue-yonder / sqlalchemy_exasol

Licence: other
SQLAlchemy dialect for EXASOL

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to sqlalchemy exasol

spark-connector
A connector for Apache Spark to access Exasol
Stars: ✭ 13 (-61.76%)
Mutual labels:  exasol, exasol-integration
hadoop-etl-udfs
The Hadoop ETL UDFs are the main way to load data from Hadoop into EXASOL
Stars: ✭ 17 (-50%)
Mutual labels:  exasol, exasol-integration
virtual-schemas
Entry point repository for the EXASOL Virtual Schemas
Stars: ✭ 24 (-29.41%)
Mutual labels:  exasol, exasol-integration
r-exasol
The EXASOL package for R provides an interface to the EXASOL database.
Stars: ✭ 22 (-35.29%)
Mutual labels:  exasol, exasol-integration
django-pyodbc-azure
Django backend for Microsoft SQL Server and Azure SQL Database using pyodbc
Stars: ✭ 327 (+861.76%)
Mutual labels:  odbc, pyodbc
Videospider
抓取豆瓣,bilibili等中的电视剧、电影、动漫演员等信息
Stars: ✭ 186 (+447.06%)
Mutual labels:  sqlalchemy
Fpage
Tornado project generator. Start a project with tornado, mako/jinjia2 and sqlalchemy/peewee in a minute.
Stars: ✭ 242 (+611.76%)
Mutual labels:  sqlalchemy
Databases
Async database support for Python. 🗄
Stars: ✭ 2,602 (+7552.94%)
Mutual labels:  sqlalchemy
Pytest Flask Sqlalchemy
A pytest plugin for preserving test isolation in Flask-SQLAlchemy using database transactions.
Stars: ✭ 168 (+394.12%)
Mutual labels:  sqlalchemy
fastapi-debug-toolbar
A debug toolbar for FastAPI.
Stars: ✭ 90 (+164.71%)
Mutual labels:  sqlalchemy
Autoline
建议你使用更新的AutoLink平台
Stars: ✭ 227 (+567.65%)
Mutual labels:  sqlalchemy
Awesome Sqlalchemy
A curated list of awesome tools for SQLAlchemy
Stars: ✭ 2,316 (+6711.76%)
Mutual labels:  sqlalchemy
Python For Entrepreneurs Course Demos
Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
Stars: ✭ 247 (+626.47%)
Mutual labels:  sqlalchemy
Choochoo
Training Diary
Stars: ✭ 186 (+447.06%)
Mutual labels:  sqlalchemy
tagreader-python
A Python package for reading trend data from the OSIsoft PI and Aspen InfoPlus.21 historians
Stars: ✭ 27 (-20.59%)
Mutual labels:  odbc
Gino
GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
Stars: ✭ 2,299 (+6661.76%)
Mutual labels:  sqlalchemy
The Flask Mega Tutorial
📖《The Flask Mega-Tutorial》中文2018最新版📗
Stars: ✭ 221 (+550%)
Mutual labels:  sqlalchemy
Flask Boilerplate
Simple flask boilerplate with Postgres, Docker, and Heroku/Zeit now
Stars: ✭ 251 (+638.24%)
Mutual labels:  sqlalchemy
Factory boy
A test fixtures replacement for Python
Stars: ✭ 2,712 (+7876.47%)
Mutual labels:  sqlalchemy
Db To Sqlite
CLI tool for exporting tables or queries from any SQL database to a SQLite file
Stars: ✭ 219 (+544.12%)
Mutual labels:  sqlalchemy

SQLAlchemy Dialect for EXASOL DB

https://github.com/exasol/sqlalchemy_exasol/workflows/CI/badge.svg?branch=master PyPI Version PyPI - Python Version Exasol - Supported Version(s) Formatter - Black Formatter - Isort Pylint License Last Commit PyPI - Downloads

How to get started

We assume you have a good understanding of (unix)ODBC. If not, make sure you read their documentation carefully - there are lot's of traps 🪤 to step into.

Meet the system requirements

On Linux/Unix like systems you need:

  • Python
  • An Exasol DB (e.g. docker-db or a cloud instance)
  • The packages unixODBC and unixODBC-dev >= 2.2.14
  • The Exasol ODBC driver
  • The ODBC.ini and ODBCINST.ini configurations files setup

Turbodbc support

  • You can use Turbodbc with sqlalchemy_exasol if you use a python version >= 3.8.
  • Multi row update is not supported, see test/test_update.py for an example

Setup your python project and install sqlalchemy-exasol

$ pip install sqlalchemy-exasol

for turbodbc support:

$ pip install sqlalchemy-exasol[turbodbc]

Talk to the EXASOL DB using SQLAlchemy

from sqlalchemy import create_engine
url = "exa+pyodbc://A_USER:[email protected]:1234/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC"
e = create_engine(url)
r = e.execute("select 42 from dual").fetchall()

to use turbodbc as driver:

from sqlalchemy import create_engine
url = "exa+turbodbc://A_USER:[email protected]:1234/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC"
e = create_engine(url)
r = e.execute("select 42 from dual").fetchall()

The dialect supports two types of connection urls creating an engine. A DSN (Data Source Name) mode and a host mode:

Type Example
DSN URL 'exa+pyodbc://USER:PWD@exa_test'
HOST URL 'exa+pyodbc://USER:[email protected]:1234/my_schema?parameter'

Features

  • SELECT, INSERT, UPDATE, DELETE statements
  • you can even use the MERGE statement (see unit tests for examples)

Notes

  • Schema name and parameters are optional for the host url
  • At least on Linux/Unix systems it has proven valuable to pass 'CONNECTIONLCALL=en_US.UTF-8' as a url parameter. This will make sure that the client process (Python) and the EXASOL driver (UTF-8 internal) know how to interpret code pages correctly.
  • Always use all lower-case identifiers for schema, table and column names. SQLAlchemy treats all lower-case identifiers as case-insensitive, the dialect takes care of transforming the identifier into a case-insensitive representation of the specific database (in case of EXASol this is upper-case as for Oracle)
  • As of Exasol client driver version 4.1.2 you can pass the flag 'INTTYPESINRESULTSIFPOSSIBLE=y' in the connection string (or configure it in your DSN). This will convert DECIMAL data types to Integer-like data types. Creating integers is a factor three faster in Python than creating Decimals.

Development & Testing

See developer guide

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].