Skip to main content

SQLAlchemy dialect for IOMETE via Arrow Flight SQL

Project description

iomete-sqlalchemy

A SQLAlchemy dialect for IOMETE using Arrow Flight SQL (adbc-driver-flightsql).

All reflection methods are implemented and relational stubs (PK, FK, indexes) return graceful empty results instead of raising NotImplementedError, making it compatible with schema inspection tools and data catalog integrations.


Requirements

  • Python 3.9+
  • sqlalchemy >= 2.0.30
  • adbc-driver-flightsql >= 1.1.0
  • pyarrow >= 16.0

Installation

pip install iomete-sqlalchemy

Connection URL

iomete://<user>:<password>@<host>:<port>/<catalog>/<schema>
    ?cluster=<cluster>
    &data_plane=<data_plane>
    [&tls=true]
    [&max_msg_size=134217728]
Parameter Description Default
host IOMETE host
port gRPC port 443
catalog Top-level catalog (e.g. spark_catalog)
schema Schema / database inside the catalog
cluster IOMETE compute cluster name
data_plane IOMETE data plane name
tls Use grpc+tls transport true
max_msg_size Max gRPC message size in bytes 134217728 (128 MB)

Example

from sqlalchemy import create_engine, inspect, text

HOST       = "dev.iomete.cloud"
PORT       = 443
USERNAME   = "your-username"
PASSWORD   = "your-password"
CATALOG    = "spark_catalog"
SCHEMA     = "default"
CLUSTER    = "your-cluster"
DATA_PLANE = "your-data-plane"

engine = create_engine(
    f"iomete://{USERNAME}:{PASSWORD}@{HOST}:{PORT}"
    f"/{CATALOG}/{SCHEMA}"
    f"?cluster={CLUSTER}&data_plane={DATA_PLANE}"
)

# Check connection
with engine.connect() as conn:
    print(conn.execute(text("SELECT 1")).scalar())  # → 1

# Reflect schema
inspector = inspect(engine)
print(inspector.get_schema_names())
print(inspector.get_table_names(schema=f"{CATALOG}.{SCHEMA}"))

Supported Type Mappings

Spark / Iceberg type SQLAlchemy type
boolean Boolean
tinyint, smallint SmallInteger
int, integer Integer
bigint BigInteger
float, real Float(24)
double Float(53)
decimal(p, s) Numeric(p, s)
char(n) CHAR(n)
varchar(n) VARCHAR(n)
string, text Text
binary LargeBinary
date Date
timestamp, timestamp_ntz DateTime
array<…>, map<…>, struct<…> JSON

Contributing

See CONTRIBUTING.md for architecture overview, codebase layout, and how to run tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iomete_sqlalchemy-1.0.22.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iomete_sqlalchemy-1.0.22-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file iomete_sqlalchemy-1.0.22.tar.gz.

File metadata

  • Download URL: iomete_sqlalchemy-1.0.22.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iomete_sqlalchemy-1.0.22.tar.gz
Algorithm Hash digest
SHA256 f2f6c705167644dcc86ef31c8e75305f8253f743c0382d7eca0a21451c02b3d5
MD5 e6a40c424d9ff0ee3104067278c035af
BLAKE2b-256 1c5c5561f729e99a935efa1ee983a3ed63aa2d16368869d24eae1e1354632c60

See more details on using hashes here.

Provenance

The following attestation bundles were made for iomete_sqlalchemy-1.0.22.tar.gz:

Publisher: publish.yml on iomete/iomete-sqlalchemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iomete_sqlalchemy-1.0.22-py3-none-any.whl.

File metadata

File hashes

Hashes for iomete_sqlalchemy-1.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 c449a4dcf666feb0c41067ca14614b5a4123465dc859ba38795bc8e2ea791ebe
MD5 c7488e289b41d04e654b2f7c3e8fa881
BLAKE2b-256 18832a76b14be83f51b1821cc0452f8e91f15cda3368586403e48d97c36f2c7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for iomete_sqlalchemy-1.0.22-py3-none-any.whl:

Publisher: publish.yml on iomete/iomete-sqlalchemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page