Zettapark
Zettapark is a Python DataFrame library for ClickZetta. It provides a familiar SQL and DataFrame programming model for querying and transforming data in ClickZetta.
Highlights
- DataFrame-style API for ClickZetta workloads
- SQL and DataFrame workflows in the same session
- Local data and pandas DataFrame ingestion
- Python UDF support
Requirements
- Python
3.8+ - Access to a ClickZetta environment
- Python UDF features require Python
3.10
Installation
Install from PyPI:
pip install clickzetta-zettapark-python
Import the main entry point:
from clickzetta.zettapark import Session
Quick Start
1. Create a session
from clickzetta.zettapark import Session
connection_parameters = {
"username": "<username>",
"password": "<password>",
"service": "<service>",
"instance": "<instance>",
"workspace": "<workspace>",
"schema": "<schema>",
"vcluster": "<vcluster>",
}
session = Session.builder.configs(connection_parameters).create()
Use the standard ClickZetta connector parameter names shown above.
2. Run SQL
rows = session.sql("select 1 as id, 'hello' as message").collect()
print(rows)
Session.sql() is lazy. Execution starts when you call an action such as
collect(), show(), or to_pandas().
3. Use the DataFrame API
from clickzetta.zettapark.functions import col
source_df = session.create_dataframe(
[[1, "alice"], [2, "bob"], [3, "cindy"]],
schema=["id", "name"],
)
source_df.filter(col("id") >= 2).show()
You can mix SQL and DataFrame operations in the same workflow:
from clickzetta.zettapark.functions import avg
sales_df = session.table("sales.orders")
summary_df = sales_df.group_by("region").agg(avg("amount").alias("avg_amount"))
summary_df.sort("region").show()
4. Create a DataFrame from pandas
import pandas as pd
pdf = pd.DataFrame(
[(1, "beijing"), (2, "shanghai")],
columns=["id", "city"],
)
session.create_dataframe(pdf).show()
Resources
- Package:
clickzetta-zettapark-python - Homepage: https://www.yunqi.tech/
- Documentation: https://yunqi.tech/documents
- ClickZetta docs: https://doc.clickzetta.com/
- Development and contribution guide:
AGENTS.md
License
Apache-2.0. See LICENSE.txt for details.
Metadata
Release files for clickzetta-zettapark-python 0.1.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clickzetta_zettapark_python-0.1.17.tar.gz | 235.0 kB | Without provenance | Details for clickzetta_zettapark_python-0.1.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clickzetta_zettapark_python-0.1.17-py3-none-any.whl | Python 3 | none | any | Details for clickzetta_zettapark_python-0.1.17-py3-none-any.whl |
Total release size: 505.7 kB
Release files / clickzetta_zettapark_python-0.1.17.tar.gz
| Download URL | clickzetta_zettapark_python-0.1.17.tar.gz |
|---|---|
| Size | 235.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fa42a635a131d27ea01b25b10e2b3ea542d171ea436b701fd9df42c6e730525
|
|
BLAKE2b-256 checksum How to use checksums |
a906432af29a021aa031405e0a9c3d9476e9805912f1cf96534d4796e6ea500c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"8.10","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / clickzetta_zettapark_python-0.1.17-py3-none-any.whl
| Download URL | clickzetta_zettapark_python-0.1.17-py3-none-any.whl |
|---|---|
| Size | 270.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
220e0b683705fa1657af07f44099ed4d9291d3c5eb0564802340ac5e06a2656e
|
|
BLAKE2b-256 checksum How to use checksums |
950ff37b3c0992d2f21a775334310604deb1cae2e0a532588a3185c727f20fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"8.10","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for clickzetta-zettapark-python 0.1.17
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.