Skip to main content

BQX

Build Status Coverage Status

Generage sophisticated query for Google BigQuery in simple way.

What is BQX?

BQX is a minimal query generator for Google BigQuery. It’s mainly intended for being used by data analysts / scientists who want to analyze big data.

BQX fires its power especially on making LONG and NESTED query. BigQuery doesn’t accept two or more queries at once so user has to make views or make terribly nested query. BQX’s features help you make long query preserving high readability. See example for its features and usage.

Requirements

  • Python 3.4 ~

Installing

pip install bqx

Example

>>> from bqx.query import Query as Q
>>> from bqx.parts import Table as T, Column as C
>>> from bqx.func import SUM
>>>
>>> shakespeare = T('publicdata:samples.shakespeare')
>>> word = C('word')
>>> q = Q().SELECT(word).FROM(shakespeare).LIMIT(10)
>>> print(q.getq())
SELECT word
FROM publicdata:samples.shakespeare
LIMIT 10

See example directory for more detailed examples.

License

This library is BSD-licensed.

Q&A

How can I use it?

Running example on REPL is good for getting started, and we suggest you to use BQX with front-ends like pandas for next step.

Is it only for BigQuery? How about MySQL or else?

It aims to generate query excecuted on BigQuery but it might be applied to other SQL environments because difference between plain SQL and BigQuery is small.

We are using some compute engines which can process SQL (and dialects) like BigQuery, Hadoop and Spark. So in near future, adding other SQL dialect is planned.

Why some functions are UPPERCASE?

The first reason is for avoiding collision with Python’s reserved words. The another reason is for SQL’s UPPERCASE manners.

Is it ready to use?

Some important clauses are not implemented at present.

Where are documentations?

We’re sorry but documentation is not available right now. It will be published on ReadTheDocs.org soon. Stay tuned.

Metadata

Release files for bqx 0.0.3

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

Source distribution (sdist)

Source distribution for bqx 0.0.3
File Size Uploaded Provenance Actions
bqx-0.0.3.tar.gz 40.0 kB Without provenance Details for bqx-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 49.4 kB

Release files / bqx-0.0.3.tar.gz

Download URL bqx-0.0.3.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
95e0ad0b762af62e04c4a398655106cea39535e1406edd6cad56dec69f607aec
BLAKE2b-256 checksum
How to use checksums
659341b191e78f16abf5e33fcb5d0b88c6b83726fa00f21380dd773c0c1d418c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / bqx-0.0.3-py3-none-any.whl

Download URL bqx-0.0.3-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10ac6710e47dce26354d4b676d0baf7e15c3e5efb7fefc9c6cde6faadab19635
BLAKE2b-256 checksum
How to use checksums
4dede2dc444a283e01326e16ea8897aeddc5c51ca79d3d1144c26f2f2be93c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for bqx 0.0.3

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.

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