Skip to main content

Batch Analytics

PySpark-based analytics pipeline for ClickHouse data: Extract → Transform → Stage → Analytics. Designed to run as the main application inside a Spark driver container (invoked by analytics_runners via SparkApplication CRD).

Bundle contents

Only the files required for the batch analytics job runner:

analytics/
├── pyproject.toml
├── requirements.txt          # core + scipy + boto3 + clickhouse-connect (single-file install)
├── requirements-batch.txt  # includes requirements.txt
├── README.md
└── src/
    └── batch_analytics/
        ├── __init__.py
        ├── __main__.py        # python -m batch_analytics
        ├── job_runner.py      # Entry point
        ├── config.py
        ├── extract.py
        ├── transform.py
        ├── log.py
        ├── README.md
        └── analytics/
            ├── __init__.py
            ├── linear_regression.py
            ├── correlation.py
            ├── pca_clustering.py
            └── t_test.py

Install

  • pip install batch-analytics — core (numpy only)
  • pip install batch-analytics[spark] — PySpark ETL + job runner + SciPy (t-test / ANOVA)
  • pip install batch-analytics[autogluon] — AutoGluon + I/O (Gluon image; no PySpark)
  • pip install batch-analytics[full] — PySpark + AutoGluon + I/O
pip install -e ".[spark]"   # dev

Run

# Via module
python -m batch_analytics

# Via CLI (after pip install -e .)
batch-analytics

# Full pipeline
batch-analytics

# Analytics only (from staged ClickHouse table)
batch-analytics --from-stage --modules lr corr pca ttest

Configuration

See src/batch_analytics/README.md for environment variables and usage.

Docker image

For Spark on Kubernetes, build an image that includes this package and exposes job_runner.py at the path used by mainApplicationFile (e.g. local:///opt/analytics/job_runner.py).

Metadata

Release files for batch-analytics 0.3.36

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

Source distribution (sdist)

Source distribution for batch-analytics 0.3.36
File Size Uploaded
batch_analytics-0.3.36.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batch-analytics 0.3.36
File Interpreter ABI Platform
batch_analytics-0.3.36-py3-none-any.whl Python 3 none any Details

Total release size: 98.1 kB

Release files / batch_analytics-0.3.36.tar.gz

Download URL batch_analytics-0.3.36.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
11cfbcba6b28eefb7aeac17796f10ef1db26585672faf7ca009eafa9339d4f9c
BLAKE2b-256 checksum
How to use checksums
9157be193de3aa092c225d0279e6ad1b4886c84a6044e3ebb248a0b0c78104c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / batch_analytics-0.3.36-py3-none-any.whl

Download URL batch_analytics-0.3.36-py3-none-any.whl
Size 52.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a62b9b091ee8688e8f97c9655fe3005f4779176ac35cfba756fc00f60bb6732
BLAKE2b-256 checksum
How to use checksums
3e4a63bf27ccefacd46e98f1c2877dc4306c897ef3b4b7f08f0ca7e578f83887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

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