Skip to main content

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

License

Apache-2.0. See LICENSE.txt for details.

Metadata

Release files for clickzetta-zettapark-python 0.1.16

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

Source distribution (sdist)

Source distribution for clickzetta-zettapark-python 0.1.16
File Size Uploaded
clickzetta_zettapark_python-0.1.16.tar.gz 226.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clickzetta-zettapark-python 0.1.16
File Interpreter ABI Platform
clickzetta_zettapark_python-0.1.16-py3-none-any.whl Python 3 none any Details

Total release size: 486.3 kB

Release files / clickzetta_zettapark_python-0.1.16.tar.gz

Download URL clickzetta_zettapark_python-0.1.16.tar.gz
Size 226.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1eab0b47b75c5c417aff1303f987d68fd248dd0092b98c85d9662c3fd378e148
BLAKE2b-256 checksum
How to use checksums
efc7881417dcbf31d6e328024832b24a7e97f25e223bf1060cad6b375081ad01
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.16-py3-none-any.whl

Download URL clickzetta_zettapark_python-0.1.16-py3-none-any.whl
Size 260.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92761926bbd6ce8bf5b061a560ade721c78b224b60ce2a712438f09608e4a2e8
BLAKE2b-256 checksum
How to use checksums
05c721ce41e3a332e9dff324efe0a33f785afa3c49623774b2bf0056ba01c80c
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 history Release notifications | RSS feed

This release

0.1.16 This release

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

1 release file

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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