Skip to main content

Read and write Alteryx YXDB files

Project description

OpenYXDB

CI License: GPL v3 PyPI Docs

Read and write Alteryx YXDB files from Python and C++.

Built on Alteryx's official open-source YXDB implementation, released under GPLv3. This fork modernizes the build system, fixes bugs, adds cross-platform support, and wraps the C++ core in a Python package with first-class PyArrow, Pandas, and Polars integration.

What changed from the Alteryx original

  • Cross-platform support -- builds and runs on Linux, macOS, and Windows (the original targeted Windows only)
  • Python bindings via nanobind, published to PyPI as openyxdb
  • PyArrow, Pandas, Polars, and DuckDB read/write integration with automatic type mapping
  • Bug fixes -- block index was never written to disk (broke files with more than 65,536 records), reference-counting crash on GCC
  • Modern CMake (3.20+, target-based), pixi for dependency management, Catch2 test suite, GitHub Actions CI

What is YXDB?

YXDB is the native binary format used by Alteryx Designer. Two on-disk layouts are in active use: the original format used by the classic engine and a newer columnar-friendly variant emitted by the AMP engine.

This library reads both layouts automatically -- the file's magic bytes are sniffed at open time and the appropriate decoder is selected. New files written through openyxdb.Writer use the original format.

Install

pip install openyxdb

Usage

import openyxdb

# Read to PyArrow, Pandas, or Polars
table = openyxdb.to_pyarrow("data.yxdb")
df = openyxdb.to_pandas("data.yxdb")
df = openyxdb.to_polars("data.yxdb")

# Write from any of them
openyxdb.from_polars(df, "output.yxdb")
openyxdb.from_pandas(df, "output.yxdb")
openyxdb.from_pyarrow(table, "output.yxdb")

All 17 YXDB field types are supported: Bool, Byte, Int16, Int32, Int64, FixedDecimal, Float, Double, String, WString, V_String, V_WString, Date, Time, DateTime, Blob, and SpatialObj.

Polars integration

Importing openyxdb automatically monkey-patches polars with YXDB support (no-op if polars is not installed). No extra setup is required.

Top-level aliases

import polars as pl
import openyxdb  # registers everything on import

# Eager read — returns a DataFrame
df = pl.read_yxdb("data.yxdb")

# Lazy scan — returns a LazyFrame with projection & predicate pushdown
lf = pl.scan_yxdb("data.yxdb")
df = lf.select("col_a", "col_b").filter(pl.col("col_a") > 10).collect()

Namespace plugins

# Write a DataFrame directly
df.yxdb.write("output.yxdb")

# Stream a LazyFrame through the streaming engine and write in chunks
lf.yxdb.sink("output.yxdb", chunk_size=65_536)

lf.yxdb.sink() (and the top-level openyxdb.sink_yxdb(lf, path)) execute the lazy plan on Polars' streaming engine and write the result to the YXDB file in chunks, so the writer never buffers more than chunk_size rows in Python at a time. Polars 1.x does not expose a public plugin API for custom sink_* formats, so the query result still passes through a single collect() call before being chunk-written; true per-batch push sinks require upstream Polars support.

Pushdown support

scan_yxdb implements pushdown against the underlying reader:

Optimization Supported Notes
Projection pushdown Yes Only requested columns are decoded from disk.
Row-limit pushdown Yes head(n) / fetch(n) stops decoding once n rows produced.
Batched streaming Yes Default 65 536 rows; honours Polars' batch_size hint.
Predicate pushdown Partial Predicates evaluate per batch after decode. YXDB has no per-block statistics, so genuine file-level skipping isn't possible; combined with head predicates still short-circuit once enough rows are collected.

Manual registration

If you import openyxdb after polars is already loaded, everything is registered automatically. To re-register or verify:

openyxdb.register_polars()

DuckDB integration

import duckdb, openyxdb

con = duckdb.connect()

# Register a YXDB file as a SQL view
openyxdb.register_duckdb(con, "yx", "data.yxdb")
con.execute("SELECT COUNT(*) FROM yx WHERE score > 90").fetchone()

# Or get a relation directly
rel = openyxdb.to_duckdb("data.yxdb", con)

# Write the result of a DuckDB query to YXDB
openyxdb.from_duckdb(
    "SELECT id, score FROM yx WHERE score > 90",
    "top_scores.yxdb",
    con=con,
)

DuckDB support is provided through Arrow interop: YXDB files are loaded into an Arrow table and registered on the connection. A native DuckDB table function (SELECT * FROM read_yxdb('file.yxdb')) would require a C++ extension, which is out of scope for this package.

Building from source

pixi install
pixi run build
pixi run test

Limitations

  • Spatial indexes are skipped on read and not created on write.
  • Spatial objects are accessible only as raw blobs (SHP-encoded binary).
  • Little-endian architectures only (x86, ARM).

Testing

The reader has been validated against 1,012 real-world E1 YXDB files sourced from the community corpus at Sigilweaver/YXDB-Sources, covering a wide range of field types, encodings, record counts (0 to 200k+), and filenames including non-ASCII characters — 100% pass rate.

The 1.3.0 streaming sink (sink_yxdb) and DuckDB round-trip paths are exercised against a sampled 25-file subset of the corpus in addition to the per-feature unit tests. Full Python suite: 1,040 passed.

License

GPLv3 -- see LICENSE.

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

openyxdb-1.4.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distributions

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

openyxdb-1.4.0-cp314-cp314-win_amd64.whl (205.5 kB view details)

Uploaded CPython 3.14Windows x86-64

openyxdb-1.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (268.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openyxdb-1.4.0-cp314-cp314-macosx_11_0_arm64.whl (191.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

openyxdb-1.4.0-cp313-cp313-win_amd64.whl (198.8 kB view details)

Uploaded CPython 3.13Windows x86-64

openyxdb-1.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (268.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openyxdb-1.4.0-cp313-cp313-macosx_11_0_arm64.whl (191.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

openyxdb-1.4.0-cp312-cp312-win_amd64.whl (198.8 kB view details)

Uploaded CPython 3.12Windows x86-64

openyxdb-1.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (268.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openyxdb-1.4.0-cp312-cp312-macosx_11_0_arm64.whl (191.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

openyxdb-1.4.0-cp311-cp311-win_amd64.whl (199.5 kB view details)

Uploaded CPython 3.11Windows x86-64

openyxdb-1.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (269.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openyxdb-1.4.0-cp311-cp311-macosx_11_0_arm64.whl (193.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

openyxdb-1.4.0-cp310-cp310-win_amd64.whl (199.6 kB view details)

Uploaded CPython 3.10Windows x86-64

openyxdb-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (270.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

openyxdb-1.4.0-cp310-cp310-macosx_11_0_arm64.whl (193.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file openyxdb-1.4.0.tar.gz.

File metadata

  • Download URL: openyxdb-1.4.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0.tar.gz
Algorithm Hash digest
SHA256 5dfcd79cadf2775647469d08a704b4543733f84515a95b00ea3767bfafc92cb5
MD5 7b24d014a9bee171182ab9fde50b10e1
BLAKE2b-256 3b6c863bf67bb3091dfd628bfb24da60e1a41c696aabd29c9257ac91dc913156

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0.tar.gz:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.4.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 205.5 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 187c989ac33604cbdce98d38288949067582bf484d2332aa90a3e5ec15cfd1eb
MD5 9d529914c53ef4eb201602e7ada60d28
BLAKE2b-256 46d7270af88b029ef4543fd3a0b822023fb4c147edf9452b4a3223006813f62e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7d82a78ea08dcc70e91eecb4976c1e80d7f6bf31e445f8a46cff54e133811ba
MD5 c472f7e673b79a9cf50b45b2d8f7df0a
BLAKE2b-256 fd8eb4a8180f386a1c74c8cd59c74108afc8b072de3d8f17d16985a83cc5cc2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a91cf54748012f719a69fdcb67a6c5c47507843d92e1a7e4c36960fd10c5be6a
MD5 e0575b56b63456da4e33136ccf99035d
BLAKE2b-256 d9585f597991016c8e29f1c0f78c3cccf10c8f010138b2291667c406cb14f887

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 198.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ed53d45b686abb1b1c33ae83f1dc653755c1f5fa14e52a0cb312317f8e8faa02
MD5 e6fde1ec7a1ce336379b55679d48fd4e
BLAKE2b-256 a7d06fc302ff1f4862d20e804c272189c770a3cbebe696b5f9f83cacfc649a2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e72d7790e01f1ea35a07875f28d6ab5ef096b15d0302f6a66a0a3111a63f648
MD5 dbd1d2860c1011a0dfeff74c8b32222c
BLAKE2b-256 ac139b8eafac48d61c1d4cd43af73d2ac03d9dbae948c77281c8a4dcea27f375

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a6121acfcb1c412633a288742505df0b336d784339ed86950d6dd2301daa93b1
MD5 f4dadd36b38414f3f6a9e9131045237d
BLAKE2b-256 814fc62a54f404e583d245f7b7c3852816ff4a59de57fd5e254bf0488f8a667d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 198.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b2198c2c4f85261a3e237add86f993eff7b63f5e17c3b75d790f1d50e3c02b90
MD5 3e503db76b693469ad77bf9dd24bff64
BLAKE2b-256 afb6d932ad6a775f38934a9c45196c88f5a6ca5b601fcc2c8d86c61d10428172

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a7457db35a42df51df92a32f85e426923dfbdb165f9911cadf3e2102352d032
MD5 f2e8b4251fe3d4dd7d1ba690c7ef41a6
BLAKE2b-256 b7c220e3644bbb9fa6b679c6e7791c2d65df0f443858af8265e84394b19b0aed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 969aab1f2e4db805f80ee7fdb3069717d8b9a63789f50e872a3779b7d663309b
MD5 1a167db28bda57e3487bb9df93f59652
BLAKE2b-256 bb09a3a2d2ff5183bfc7224e6ef3d65de8a52fde482283e229ea43ac1ca1c86f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 199.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 51c97469a7017fe8072d30ed61fbc35bc5220e606c20b5560af11280b9e1e572
MD5 1dc1c165cc2cbafce6c1a3b64148a0ca
BLAKE2b-256 8132bd6b7f834196a8a1c08c88c5151e645b807990356d3b56c1cae8a8ff3f0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6352b570fcba63e62131696449ddad45867afead4aaf739fd8a39bab1154fc93
MD5 45d5a115d36e5732942dc4cc85935986
BLAKE2b-256 b563f24c65df6a5b7b138fa52044e05d81ab9a2400d230e6f088fd0c065c676a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f3728ec24eb00068e0ac6f06bb6802ab3c06aa4fe654aec20684bfeea18d066
MD5 0111448fcbe6ba85f406b8d9accd9912
BLAKE2b-256 40c12f436c31e16933296076a237e847e182092de405dc2f8a9df1e3d5d35087

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 199.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openyxdb-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0936d81929fbd0b0783380ebcdcdfaf7323e28e511c921a20c8da9712df161ec
MD5 3272af02cf42e832bfa6c55b71f57dda
BLAKE2b-256 3d340a0073e21b6e4f764b2e1d9a5d276361e30c8d39bbab235d7109539d82da

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae5d55c51dd2c863f03b4deac209682bf8ddaa052b4c0420bfd5a1913965b689
MD5 c911fad54cabd393d019567a28433b42
BLAKE2b-256 68e8bd1a1bbe57082b25cba81bbf1f0c7d699976acb1621ec8148ad2a6f68edf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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

File details

Details for the file openyxdb-1.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0a33858902df5168d139ee26023e2fe7d4049342ede74861a7f66cc18364210
MD5 d4e861c59e4ad4d8f0271a76456520c8
BLAKE2b-256 d7e207755d71dc81092253f5c222a96165a90c93e9131733e9ea4f0407568cd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.4.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on Sigilweaver/OpenYXDB

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