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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clickzetta_zettapark_python-0.1.13.tar.gz (221.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clickzetta_zettapark_python-0.1.13-py3-none-any.whl (252.8 kB view details)

Uploaded Python 3

File details

Details for the file clickzetta_zettapark_python-0.1.13.tar.gz.

File metadata

  • Download URL: clickzetta_zettapark_python-0.1.13.tar.gz
  • Upload date:
  • Size: 221.5 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

Hashes for clickzetta_zettapark_python-0.1.13.tar.gz
Algorithm Hash digest
SHA256 2733214df64d895a12181dcccc4339ca51c31b6d73a19926df5a6bfca4e981a7
MD5 5194104d41ffc13c3c0bf4180b8e3e3b
BLAKE2b-256 df5447786bcb272675017072ec84b6dc179265b555dc5b3480657de8caeb0a8f

See more details on using hashes here.

File details

Details for the file clickzetta_zettapark_python-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: clickzetta_zettapark_python-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 252.8 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

Hashes for clickzetta_zettapark_python-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1e6589791ff4819c6324e8fc352e4551eadfc774ec8f631f4f239c5664b7d2ad
MD5 054829da9bd486047251ec4303397403
BLAKE2b-256 d03e60ff7c5e5a56868b737e0471360ad1a6df1cebd4d58de9741796488e0278

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page