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.21.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.21-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for iomete_sqlalchemy-1.0.21.tar.gz
Algorithm Hash digest
SHA256 5acec7c2f7032237901d2b0e07e4612c5b8f7c29be181c3a636484ea8ec7bc45
MD5 d8bb1e9c8e84ab805f23f17a60d3ce1d
BLAKE2b-256 a85cbfa7bc58b9b443c9577881cd2875c3e1480d3d845e69f09f1986ce69f983

See more details on using hashes here.

Provenance

The following attestation bundles were made for iomete_sqlalchemy-1.0.21.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.21-py3-none-any.whl.

File metadata

File hashes

Hashes for iomete_sqlalchemy-1.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 c1a48b2e3a565c6b37ba4df0017e7385ed85ea0e0ce21903a83e683d78c5ff07
MD5 a872fdde4bd16fd064fc5b8600575b66
BLAKE2b-256 b9cecc89d686924cb8eea365f4888bb701c1521556039ed63913002f825a136c

See more details on using hashes here.

Provenance

The following attestation bundles were made for iomete_sqlalchemy-1.0.21-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