Skip to main content

Read and write Alteryx YXDB files

Project description

OpenYXDB

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. It is row-oriented: each file contains UTF-16 XML metadata describing the schema, followed by LZF-compressed blocks of records, and a block index at the end for random access.

This library supports E1 (non-AMP) YXDB files only.

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.3.0.tar.gz (2.4 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.3.0-cp314-cp314-win_amd64.whl (175.1 kB view details)

Uploaded CPython 3.14Windows x86-64

openyxdb-1.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (239.4 kB view details)

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

openyxdb-1.3.0-cp314-cp314-macosx_11_0_arm64.whl (172.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

openyxdb-1.3.0-cp313-cp313-win_amd64.whl (169.1 kB view details)

Uploaded CPython 3.13Windows x86-64

openyxdb-1.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (239.5 kB view details)

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

openyxdb-1.3.0-cp313-cp313-macosx_11_0_arm64.whl (172.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

openyxdb-1.3.0-cp312-cp312-win_amd64.whl (169.2 kB view details)

Uploaded CPython 3.12Windows x86-64

openyxdb-1.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (239.5 kB view details)

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

openyxdb-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (172.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

openyxdb-1.3.0-cp311-cp311-win_amd64.whl (170.0 kB view details)

Uploaded CPython 3.11Windows x86-64

openyxdb-1.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (240.7 kB view details)

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

openyxdb-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (173.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

openyxdb-1.3.0-cp310-cp310-win_amd64.whl (170.2 kB view details)

Uploaded CPython 3.10Windows x86-64

openyxdb-1.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (241.1 kB view details)

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

openyxdb-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (173.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for openyxdb-1.3.0.tar.gz
Algorithm Hash digest
SHA256 e84af2d17abb7fc974f372353bb1fa52b24008d2a0e891af3eb7d44e6c59905c
MD5 2264b7efc62eac7503fe72e4ea83fd11
BLAKE2b-256 547c98fbe4b4d74def992f2ae899fcca60ecdb91a24b5cf3598b99ad4649d3cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 175.1 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.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 b00fbb47e71aa577270d586baf181e9d072d0fd3ebd8625d522b9c6aa09255c3
MD5 d7a46a831cb9da809f34f0bb51d2dea1
BLAKE2b-256 30e7c41fcb82cea95cdc4b6cb102f915ea815e9fc5653bf781cac387679a1d09

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a66c3d821c9034f99dc278f9653dbad2a3bfac3dad7808dd8973080120792ab
MD5 28f68c50f51b4d62b6e6d9a2760e9b93
BLAKE2b-256 deac4ba3df4c8fbaeca0041b0cc4cfea39ccff1dfaf608272ca9728e92cae83f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44e7125c1beed35600454a889f0a77f509f54311158e8130275d19393d4ddc49
MD5 fa3369ed47ece9f94b651208f21774da
BLAKE2b-256 b7056dc405a9ec053a4f2f2f62174b82ef905e152faf21ad5e739aa25d58f404

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 169.1 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.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0c5c422de580d38d9ab11c714397638a9a7f2a2f2b34f1b7c2fd46b42fbaf6a7
MD5 9242484c76ea38f4204db87f8e2831c1
BLAKE2b-256 c4a18327b9b0001a98c943f19122e4bee3ea857a689c73d8c687a22f1538139e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 007ef10c95b80094f49720c320c78b347957fe66d322f3357e297be04d566e91
MD5 2e8fad05a3178cd059cb48d1d308aeec
BLAKE2b-256 9f0f6160fbdda8ee83161ea585f5a684c8e05c8f146891e1214e39d24379ecb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e6e8967c798264ce158b8abefb8d1b58d0ca5a994a4f92e8b148945af052d89d
MD5 1ebea2474cb0fbeddcb1880f96905905
BLAKE2b-256 da033f8ab48436460aedb84299858c0305c53c022aaabcb216c2e6ca5cdf1bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 169.2 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.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 68718e95390037d385e80c92a745f7ee5bc49272fca537e9b459a4e41ffa3465
MD5 1982843d729a4750fc85ac804f63b8fe
BLAKE2b-256 9cc64631ddc2109dc6bb90e6dc2a88b1fb76a5049a7cc6130e23f140095e7ab0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1eec1f1a8f2a21c59f27a282d0a72af740bfb5f05014c7afc5547c284e7d6711
MD5 6228040e2f05da474ef60109a651328a
BLAKE2b-256 93eb9838208699dce218181af501c0fcc7b84e3344e35d535915b34b690d2016

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b7ec2b597d493b2830b63beaa08653055a3da06387c92180a6fd4389bcb2d32
MD5 2a19ee3dce368b9128e7a328dea88967
BLAKE2b-256 88ccd2ad685a233fba89a595ae29afd55621a6c46ede4e36e49b7f7c70eda87b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 170.0 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.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c8886bd95cf9e6953f943fc531e678883a55063dcfe54b43912f0a17d9e3a22b
MD5 f249838d64448e1858d74163452f3c3b
BLAKE2b-256 983787eb055875a34c5fc52a983743f08503eb2aa369f70c0ba593592df6c74a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d37ed0eb6a5cf5bc923ca04b9ff511c3a3f5a28309ce913b6695c5a8f67d22f5
MD5 69252e8e867196220ce820916835ac80
BLAKE2b-256 67a409db9473ddbdf823643cd19ed777f8085607c667cf58e720f134fe866e2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbb2bd7514468cd0a579cb79303022a891b90079676ae14673f0f83407f25231
MD5 335f5a16e9cf1e4921c32311e18e42be
BLAKE2b-256 11f65eaf374468d0eb6a3d180d2645ddfb88bfcbb3ada85df62a945a4481c2f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: openyxdb-1.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 170.2 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.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7b159f56b44aad6e3f0bbefaa5ce8d511aae9f9522ef9fe86c0978c8b8fe0e29
MD5 88171a29c1d06e56e3e456e1f5619572
BLAKE2b-256 6d312976fa382a4d460ae57d667ffd6ae3e69a6ff245f0b0db3e59c09b26b71e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18abef1b2123f7507490ae9c8352c5b9a39ac5fce55dc263c6a5816f49d42278
MD5 e543fee08c0a1c5e153bd48f529320cc
BLAKE2b-256 0f469ac49a13497c9699d24e3b5d090802a18e4abc999d77728f6f6787659931

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openyxdb-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 949b5987d4d507ee78c45a71b906877f0d4fa384720fb17247d667a611312abf
MD5 52919f64580733469b050a3c8a36550b
BLAKE2b-256 49d58604b236ad44e85bf5e827c8da67d77b93a04b6290787fc676fcbab49ec4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openyxdb-1.3.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