Skip to main content

sqldim

sqldim is a high-performance Python toolkit for Unified Dimensional & Graph Modeling. Built on top of SQLModel, it allows you to define complex Kimball-native structures that power both BI star schemas and network relationship traversals in a single, consistent model.

Core Pillars

  • 🚀 Vectorized ETL: Powered by Narwhals. Handles millions of rows with single-pass joins using Polars, Pandas, or DuckDB backends.
  • 🔄 Automated SCD: Built-in support for Type 1, 2, 3, and 6. Vectorized change detection eliminates row-by-row Python loops.
  • 🕸️ Dual-Paradigm Graph: Project your dimensions as Vertices and facts as Edges. Traverse networks using Recursive CTEs without leaving your SQL database.
  • ⏳ Semantic Time-Travel: Fluent query builder with automatic AS OF join resolution for point-in-time analysis.
  • 🧊 Open Table Ready: Natively compatible with Apache Iceberg and Delta Lake via PyArrow/Narwhals integration.

Key Features

  • Hybrid SCD: Combine typed columns with versioned JSONB property bags for flexible, heterogeneous metadata.
  • Cumulative History: Replicate the "Array-of-Structs" pattern for dense longitudinal data (e.g., player seasons).
  • Bitmask Activity: Ultra-low footprint user retention tracking (L7/L28 metrics) encoded in 32-bit integers.
  • Topological Loading: Automatic dependency resolution ensures dimensions load before facts.

Quick Start

from sqldim import DimensionModel, SCD2Mixin, Field

class User(DimensionModel, SCD2Mixin, table=True):
    __natural_key__ = ["email"]
    email: str
    plan_tier: str
    
# Loading is vectorized automatically if you pass a DataFrame
loader.register(User, source=polars_df)
await loader.run()

Documentation

See the /docs folder for detailed guides on:

Examples

Check out our real-world showcases:

  • examples/nba_analytics/: Longitudinal career analysis.
  • examples/user_activity/: High-velocity retention tracking.
  • examples/saas_growth/: Viral referral networks.

🌸 Built with love by SylphAI

Metadata

Release files for sqldim 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqldim 0.1.1
File Size Uploaded Provenance Actions
sqldim-0.1.1.tar.gz 58.3 kB Without provenance Details for sqldim-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sqldim 0.1.1
File Interpreter ABI Platform Actions
sqldim-0.1.1-py3-none-any.whl Python 3 none any Details for sqldim-0.1.1-py3-none-any.whl

Total release size: 114.0 kB

Release files / sqldim-0.1.1.tar.gz

Download URL sqldim-0.1.1.tar.gz
Size 58.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2ac2f17038f6ec9b4bf5500a81dc4af4a8b32aa07071946f12e386aba3841063
BLAKE2b-256 checksum
How to use checksums
cc019c9acf06074b6d024c7d6b1a4ea147a778f9f24bf3b38b2385600a5c6b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.2

Release files / sqldim-0.1.1-py3-none-any.whl

Download URL sqldim-0.1.1-py3-none-any.whl
Size 55.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f91c93b4a05c3573ad7c2286014cd65f63b47bc845d0341e15d49c6b771d9b8
BLAKE2b-256 checksum
How to use checksums
0f4e39c07ef15a0cbe3cfca0454b136d1d94941cf9e29dd66e1a7304968445cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.2

Security for sqldim 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page