Skip to main content

PySpark batch analytics: Extract, Transform, Stage, and analytical modules (linear regression, correlation, PCA, t-test, LLM classification).

Project description

Batch Analytics

PySpark-based analytics pipeline for ClickHouse data: ExtractTransformStageAnalytics. 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).

Project details


Download files

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

Source Distribution

batch_analytics-0.3.34.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

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

batch_analytics-0.3.34-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file batch_analytics-0.3.34.tar.gz.

File metadata

  • Download URL: batch_analytics-0.3.34.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for batch_analytics-0.3.34.tar.gz
Algorithm Hash digest
SHA256 4a52db758e4516f0e693080b39b3239b7d15b824bf0027d8793ef52198172343
MD5 0031e4a16e4b0c62d8263dd78d9a4a3d
BLAKE2b-256 958d6f2125e34d975c78852c6eabd8c7081b86a46f4927334d8f4d66471ecb04

See more details on using hashes here.

File details

Details for the file batch_analytics-0.3.34-py3-none-any.whl.

File metadata

File hashes

Hashes for batch_analytics-0.3.34-py3-none-any.whl
Algorithm Hash digest
SHA256 ec72054404e13df6f065033379b075711df9f512e10ecc2041907f4d8d27ef87
MD5 00b97557bdb4f777a6c7b3b986e94bd8
BLAKE2b-256 1e108acab67c9db10e4ced7c95e0831a8e4bbc60f7f690ef5f3a9f20b6c8e7d0

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 Pingdom Monitoring Sentry Error logging StatusPage Status page