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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clickzetta_zettapark_python-0.1.15.tar.gz.
File metadata
- Download URL: clickzetta_zettapark_python-0.1.15.tar.gz
- Upload date:
- Size: 223.6 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec412e4d68da8032327b1b04ffa9ef56bc7ca9e5b9f6641fe10e3d31ada7a47e
|
|
| MD5 |
2a89aa5d75ce4bbe22809ba4b3300255
|
|
| BLAKE2b-256 |
597dee731189c674b1c69ecab8874fad65e275e957086db5fc883444e8c2d2a2
|
File details
Details for the file clickzetta_zettapark_python-0.1.15-py3-none-any.whl.
File metadata
- Download URL: clickzetta_zettapark_python-0.1.15-py3-none-any.whl
- Upload date:
- Size: 255.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16a94a6ff7b353b5050c2ce9424236c6601ddc83def99aed9f9e86bc6a514e84
|
|
| MD5 |
f1c4b21a59a787c0db2d9e41abbe491b
|
|
| BLAKE2b-256 |
3485ce61b51eb4d492d102a21e760d6d129f1ddd677e6e1bd5b039de2ac47363
|