Python SQL Query Engine
Project description
Query your data, where it lives.
Opteryx is a SQL Engine designed for embedded and cloud-native environments, and with command-line skills.
Documentation | Examples | Contributing
Use Cases
- Using SQL to query data written by another process, such as logs
- As a command line tool - Run SQL directly on files - bring the power and flexibility of SQL to filter and transform files
- As an embeddable engine - a low-cost option to allow hundreds of analysts to each have part-time databases
Features
Feature Rich
Supports most of the base SQL92 standard and multiple extensions from modern SQL platforms like Snowflake and Trino.
High Availability
Shared Nothing/Shared Disk design means each query can run in a separate container instance making it nearly impossible for a rogue query to affect any other users. (compute and storage can be shared)
If a cluster, region or datacentre is unavailable, if you have instances able to run in another location, Opteryx will keep responding to queries. (inflight queries may not be recovered)
Query In Place
Opteryx queries your data in the systems you store them in saving you from the cost and effort of maintaining duplicates your data into a common store for analytics.
You can store your data in parquet files on disk or Cloud Storage, and in MongoDB or Firestore and access all of these data in the same query.
Bring your own Files
Opteryx supports many popular data formats, including Parquet, ORC, Feather and JSONL, stored on local disk or on Cloud Storage. You can mix-and-match formats, so one dataset can be Parquet and another JSONL, and Opteryx will be able to JOIN across them.
Consumption-Based Billing Friendly
Opteryx is well-suited for deployments to environments which are pay-as-you-use, like Google Cloud Run. Great for situations where you low-volume usage, or many environments, where the costs of many traditional database deployment can quickly add up.
Python Native
Opteryx is Open Source Python, it quickly and easily integrates into Python code, including Jupyter Notebooks, so you can start querying your data within a few minutes.
Time Travel
Designed for data analytics in environments where decisions need to be replayable, Opteryx allows you to query data as at a point in time in the past to replay decision algorithms against facts as they were known in the past. (data must be structured to enable temporal queries)
Schema Evolution
Opteryx supports some change to schemas and paritioning without requiring any existing data to be updated. (data types can only be changed to compatitble types)
Fast
Benchmarks on M1 Pro Mac running an ad hoc GROUP BY
over 1Gb of data via the CLI in 1/5th of a second. (different systems will have different performance characteristics)
Rows | Columns | File Size | Query Time |
---|---|---|---|
561225 | 81 | 1Gb | 0.22sec |
1064539 | 81 | 2Gb | 0.27sec |
Instant Elasticity
Designed to run in Knative and similar environments like Google Cloud Run, Opteryx can scale down to zero, and scale up to respond to thousands of concurrent queries within seconds.
Try Opteryx
Install from PyPI
pip install opteryx
Query Data (Command Line)
Example usage, filtering one of the internal example datasets and displaying the results on the console.
python -m opteryx "SELECT * FROM \$astronauts LIMIT 10;"
Query Data (Python)
Example usage, querying one of the internal example datasets.
import opteryx
conn = opteryx.connect()
cur = conn.cursor()
cur.execute("SELECT 4 * 7;")
print(cur.head())
For more example usage, see Example Notebooks and the Getting Started Guide.
Community
How do I get Support?
For support join our Gitter Community.
How Can I Contribute?
We are looking for volunteers to help build and direct Opteryx. If you are interested please use the Issues to let use know.
All contributions, bug reports, documentation improvements, enhancements, and ideas are welcome.
Want to help build Opteryx? See the Contribution and Set Up Guides.
Security
See the project Security Policy for information about reporting vulnerabilities.
License
Opteryx is licensed under Apache 2.0.
Status
Opteryx is in beta. Beta means different things to different people, to us, being beta means:
- Core functionality has good regression test coverage to help ensure stability
- Some edge cases may have undetected bugs
- Performance tuning may be incomplete
- Changes are focused on feature completion, bugs, performance, reducing debt, and security
- Code structure and APIs are not stable and may change
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for opteryx-0.8.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73cd58e10beb387aefb86537cb426e9f49487d351c14f398cf2a8ae173277623 |
|
MD5 | 5a8c466e8ec1355e756ea6c9480c362f |
|
BLAKE2b-256 | 08bfd3efc828eae3724b12848c958c32f6a9646dfd99d52a51b2116d36004f5b |
Hashes for opteryx-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c62367c2a5110a818acfdbd063e4ae4880a0ef4e9af164754e87565188a5b3f8 |
|
MD5 | b0abdfc01d69eb1436649621d8deb3a0 |
|
BLAKE2b-256 | d5c2988c4d9e50d741e4f47465b4a1bc6ca27e9d46301accd09129da7f154fdc |
Hashes for opteryx-0.8.2-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca72636b5d990cf0be5088cb41451925a16dbbdbee359f319764e9fae341a6a |
|
MD5 | 90a693f197e938e1afe796ff1f63f52b |
|
BLAKE2b-256 | 996ed9f677481486851183209d0baeaf6d3baa2eeeb3dca4771aeed29462098d |
Hashes for opteryx-0.8.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab5128bb71d82afd0b6be79a5f99f6e0ef6c494a0b861a4d1d0d10fa4aa6bdd6 |
|
MD5 | f206984bb591f43148da8cd963b6967c |
|
BLAKE2b-256 | f02a41e10bc669acaeaebf5776567fe6f8d0a3ef02e3c7ae3126e4e975657545 |
Hashes for opteryx-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41019582fdbac5b434febb75ebe5827022a05013d4ec9356a41702c4ce122fd3 |
|
MD5 | 7a5c2f3674332f7c5d623a340a93369a |
|
BLAKE2b-256 | 8c2568a9887bcdaa51cdca2a6823c87b89da9e5096a384bb6b5a3bc3af216df1 |
Hashes for opteryx-0.8.2-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b67654dd50518621823ffc11a9af45ea39f9d27289b1a57e7240ecd3e66b75f |
|
MD5 | ab223869a01de057a47b9fbf41f7c7d0 |
|
BLAKE2b-256 | 8efe2f8b117c6f805064a50df9c6621359a3986ab3e267c93edce6a8f160de32 |
Hashes for opteryx-0.8.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f428b74fc76560dc43d085c371b2e881156b104485ede9bfd870da433e2b41ff |
|
MD5 | 24e9d007b3c970be0bf7f9a257bbd01c |
|
BLAKE2b-256 | 16cd09c337db8f69a25305822fe829d487344681ca330ccfb3f47a30b49b45fe |
Hashes for opteryx-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187950ba2c6f7ce81102b03518f876bf1bdf32e8df6b93ec283303dcf88e323b |
|
MD5 | 6da100d6400b528fb0b0551e5e91e111 |
|
BLAKE2b-256 | e8784bb8ab68a23b8ec8a4ddb1e4c254012274d17d8fdb86de3348a0ed710062 |
Hashes for opteryx-0.8.2-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91d9aa5dfb5b876f02f57a2dfcedf7ce740c978819b8322192be739287759ad |
|
MD5 | 66a08ce17c1d12296421c4fa37591c19 |
|
BLAKE2b-256 | c803e40145c0dae91e56f1a360c7349a01bd956791317e837444a96bde6630d3 |
Hashes for opteryx-0.8.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aadb68b0a4713714f9f3a785133f86a61c6f58dc627b3eeaede4fb3cee54bb99 |
|
MD5 | 0ee7255185721196e237a1c21b198295 |
|
BLAKE2b-256 | 3df6898c6be62b58d129ea8df8d9f56b9f8bdb131fc794ab5dd6f3545813e1e6 |
Hashes for opteryx-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a18f7ce7fb25c108fe67fb8ea07b0014aaf0bc30a32f56f7aa87f504865c03a5 |
|
MD5 | e70319384315f6dd64d707b86f28fdb9 |
|
BLAKE2b-256 | 491d2bacebeb268bc8687ee46b9871fa16f1c597732d2c0ffde6fa4d6769359a |
Hashes for opteryx-0.8.2-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b6ec02e02ed43a5e2f229674e09de7a93062bf40a217e660a127004cc0cbb3 |
|
MD5 | 8055ebdd11f4305b13d8cefc6cd2433c |
|
BLAKE2b-256 | 99687a68e60b1cd25a426dfd84472a8686a8b956f77c633cf7b94af89fda3dd1 |