Skip to main content

Read and write Alteryx YXDB files

Project description

OpenYXDB

CI PyPI License: GPL-3.0 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.1.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.1-cp314-cp314-win_amd64.whl (205.5 kB view details)

Uploaded CPython 3.14Windows x86-64

openyxdb-1.4.1-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.1-cp314-cp314-macosx_11_0_arm64.whl (191.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

openyxdb-1.4.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (191.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

openyxdb-1.4.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (191.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

openyxdb-1.4.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (193.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

openyxdb-1.4.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: openyxdb-1.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 18d355bb8ac17f043ef170eb2e627e1fabeb2a9785282ed399d5ad4fa89493af
MD5 4750e1cd1368429c87a568cd8c9edd8f
BLAKE2b-256 c118497757d60f1008c23dd0d89edc7d6d2b72a4dba476bd1979ef350712f0bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openyxdb-1.4.1-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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 d17a14e014d90410c9c5fb0b0f6da8652baeca1b40b0a32483d1f9c8059f467d
MD5 22cbbf5eb3ca8d098699d99e0d17daa4
BLAKE2b-256 d882e275d63031e3267c474fe8d6d645f42191c0561c63ba6b6ba0f8cfecc5cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4a05ac5bc71aa6333e5d8313aef3b8d26087821c66e8ce068247635df73d7412
MD5 18a5207596540c936423eafb920cf3f0
BLAKE2b-256 a3a8b32b2b450b27f5992254d0779be264ab44b5a1f16d2430acf63e78dd6bb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f7ffffe4bce3eb85462deb0be662f2d6844033f41597b559937920f4ec04481
MD5 50bbf3119f2ab6a6cee34dd26bbe8393
BLAKE2b-256 1e06554d2fa081ff1729d5fd63ff53d7fe7f31ae78fd74498f859dc3249b85db

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openyxdb-1.4.1-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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4b37cf90cab42853cb15d9dc029670d740545623c2f221a5162161bd25b7359f
MD5 597f2b7cb3e0f33216e816a77ea516e8
BLAKE2b-256 8d09717e6c3f53f076481bff9ba80d102d26639fe685df3e695405cadd370fff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f622dbc5da8974bb9d633d0a1fc231f21f5f04ad47259e3833df9777157f9f2b
MD5 2b01b36d4498dde774685ad5998bd1d6
BLAKE2b-256 183458cd12c350859779d3f0af959a0945255c95b5ce16d699a3a6154874b72e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a64588e06989bea38a5302f1b5d93a0c5e9336d1a8c7aa04c6266b694c25ac9b
MD5 f1e42a19b85885b1c277f02ae246b21e
BLAKE2b-256 6de3646b78559b979e52606b8a89fc5bff8d068955a859e9767e9c74617bb1df

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openyxdb-1.4.1-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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 57d86ef6501ddc864bec8a1e1e0ed58dd96e3c4d2d87e1244cc6dfa932b68c71
MD5 ace11336b6132709d8118a824e46adf8
BLAKE2b-256 dd6849f57fb12a7fad65909863964dd16d88435181a03eebf4640453fd26d057

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 411cf152dd3c2a3a2a1bac136e957e683cde9fd5ac997759bdd1835779536222
MD5 3edf6521a10b333844db7b2140dc251e
BLAKE2b-256 280968e951c2488c4dc465d4bdd3c9354269dc19d53fcc61e2d8c5dbe8e7d3a7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad29fea28ed67ff2a5f4785badea4ac30d2bebf3824afd2f75d3da264e80b865
MD5 50e77cb891653537da23a99e16725c7d
BLAKE2b-256 32a83ba2399eeb96c80796fa259e4af259a2efb4ab60c089471f6b55f8197dae

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openyxdb-1.4.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 07db541b2798bdc9f7452b7d6677080bd55ef83eabcaa6ad72dda652b2eb6908
MD5 ee4e9259f6b5caaa3b43d8dcdadadd2f
BLAKE2b-256 3a9d2852169f2d4ed2d09aa0a2a7750f86346db37fd82fd06ddd7058f9f17da3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e59b8438a966b66b2fb5bf779bca3a67aadd689fc87aaa240897350d4e0cb0b
MD5 1aee8839a9084cc5b4984ee78960f152
BLAKE2b-256 6909107f057b511635764bb0c66097b0fbf1c28ede953701d93ad20798ce715c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c600aed0301dfedf587b1e9353e123ff72c5b2481975875e53b190b8d92e9c0
MD5 c22fd6c0f4ab97bf23067f6d52f04564
BLAKE2b-256 084fe31518d7eb88b7b244bbd8db8d119dd3a0ce81f3bedf9dbcefd50aef7087

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openyxdb-1.4.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 667d24f916b9419887717adea1b890f596df1a28cd71c1ac1e36e3327b3636ff
MD5 fadcc791544fb6dcdd0d84ce54d23b3f
BLAKE2b-256 d5ca43ae8be9936219f34aa28a6431fbdcc93edb8571089b21ed9065a8d2d428

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 259d557933617d7eb199c8c5de410f702a4d20474d02c6106c0a50fbc44b913e
MD5 3d7d533eb2c5881dd7bc8c9bf14b76c4
BLAKE2b-256 961a5b8c62751fc605560eeb260ec02e0f08f5d9a104d1da8b3182a1eaa8de88

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openyxdb-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 974ba41c1410189df5fb7e989c1356cb20b4a235effae0be0f3deecaa276d4b7
MD5 32be2adc9e6d241f5c9cf7cc9a8a603d
BLAKE2b-256 8f87fe7a8df4ff8277e12251af5bb540139dd87d487113cacf9cbe926a470be7

See more details on using hashes here.

Provenance

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