Command Palette

Search for a command to run...

Back to skills
skill № 51460

data-batch-processing

Use when the user asks about Hive, HiveQL, Spark SQL batch jobs, Hive metastore, partitioning and bucketing, ORC vs Parquet for batch, Catalyst/AQE tuning or…

FreeNo executable scripts
j4flmaoby j4flmao★ 47 GitHub stars

Install data-batch-processing in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Data Batch Processing

Purpose

Design efficient batch processing architectures using Hive, Spark SQL, and optimized file formats. Master partitioning, bucketing, Catalyst optimizer tuning, vectorized reads, file format selection, and dynamic partition pruning for large-scale analytical workloads.

Agent Protocol

Trigger

Exact user phrases: "batch processing", "Hive", "Spark SQL", "Pig", "HQL", "Hive partition", "Spark partition", "bucketing", "query optimization", "ORC", "Parquet", "Avro", "vectorized read", "dynamic partition pruning", "Catalyst optimizer", "Tungsten", "Hive metastore", "reduce tasks".

Input Context

Before activating, verify:

  • Query engine (Hive on Tez, Hive on MR, Spark SQL, Presto, Trino)
  • File format currently used (text, Parquet, ORC, Avro, JSON)
  • Table volume (row count, size in TB, partition count)
  • Partition column(s) and cardinality
  • Common query patterns (full scan, filtered, aggregated, joined)
  • Cluster resources (cores, memory, number of nodes)

Output Artifact

Batch processing configuration with engine selection, partition strategy, and optimization parameters.

Response Format

Engine: {Hive on Tez | Spark SQL | Presto | Trino}
File Format: {Parquet | ORC | Avro}
Partition: {column: type, granularity: daily/hourly/monthly}
Bucketing: {column: cluster count}
Optimizations: {vectorized, CBO, DPP, broadcast join}
Tuning: {executor/container config, parallelism}
-- DDL with partition/bucket spec
-- Query with optimization hints

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • Query engine selected with justification
  • File format selected and configured
  • Partition strategy defined (column, granularity, layout)
  • Bucketing strategy defined if applicable
  • Catalyst/BE optimizer settings configured
  • Vectorized read enabled

Max Response Length

250 lines of config.

Workflow

Step 1: Engine Selection

Engine Comparison

Feature Hive on Tez Spark SQL Presto/Trino Dask SQL
Execution DAG (Tez) DAG (Spark) MPP (parallel) Task graph
In-memory No (disk via Tez) Yes (RDD/DF) In-memory pipeline Yes (dataframes)
Latency Minutes Seconds-minutes Sub-second Seconds
SQL standard HQL (limited) ANSI SQL ANSI SQL SQL via Dask
UDF support Java UDF Python/Scala/Java Java/Python Python
Cost-based Yes (CBO) Yes (CBO + AQE) Yes (cost-based) No
Best for Legacy Hive Complex ETL, ML Interactive SQL Python pipelines

Decision Tree

Query interactivity requirement?
├── Sub-second interactive SQL
│   └── Presto/Trino (MPP, in-memory)
├── Minutes: Complex ETL, joins, aggregations
│   ├── Large datasets, DataFrame API → Spark SQL
│   └── Legacy Hive environment → Hive on Tez
├── Hours: Massive batch, large shuffles
│   └── Spark SQL (best resilience, shuffle handling)
└── Ad-hoc Python analytics
    └── Dask SQL (Python-native)

Step 2: File Format Selection

Format Comparison

Feature Parquet ORC Avro JSON CSV
Columnar Yes Yes Row-based Semi-structured Row-based
Compression ZSTD/Snappy/GZIP ZSTD/Snappy/GZIP Snappy/Deflate None/GZIP None/GZIP
Schema Required Required Required Implicit None
Evolution No No Yes (best) Natural N/A
Splittable Yes Yes Yes Limited No (unless compressed)
Read performance Fast (projection) Fast (projection) Moderate Slow Slow
Write speed Moderate Moderate Fast Fast Fast
Vectorized read Yes (Spark) Yes (Hive) No No No
Best for Analytics, Spark Analytics, Hive Streaming, Kafka Ingestion, logs Export, exchange

Format Selection

Primary query engine?
├── Spark SQL → Parquet (best Spark integration)
├── Hive on Tez → ORC (ACID, vectorized, best compression)
├── Streaming, Kafka, CDC → Avro (schema evolution, row-based)
├── Semi-structured, schema-on-read → JSON (flexible)
└── Data export, external exchange → CSV (universal)

Step 3: Partitioning Strategy

Partition Design Rules

Factor Recommendation
Column cardinality < 1000 partitions ideal, < 10000 acceptable
Partition frequency Daily for time-series, monthly for low-volume
Column type Date, categorical (country, status), ingestion time
Avoid High-cardinality (customer_id), frequently changing
Iceberg/Delta Use hidden partitioning (managed)

Partition Examples

-- Daily partitioning
CREATE TABLE orders (
    order_id STRING,
    customer_id STRING,
    total_amount DECIMAL(10,2),
    status STRING
)
PARTITIONED BY (order_date DATE)
STORED AS PARQUET;

-- Multi-level partitioning (use cautiously — directory explosion)
CREATE TABLE events (
    event_id STRING,
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/batch-error-handling.md
  • references/batch-job-scheduling.md
  • references/batch-monitoring.md
  • references/batch-optimization.md
  • references/batch-processing-patterns.md
  • references/batch-vs-streaming.md
  • references/incremental-loading.md

FAQ

What does the data-batch-processing skill do?

Use when the user asks about Hive, HiveQL, Spark SQL batch jobs, Hive metastore, partitioning and bucketing, ORC vs Parquet for batch, Catalyst/AQE tuning or dynamic partition pruning. Produces batch job designs with table layout, file format and query tuning steps. Not for choosing Spark vs Dask vs Ray (use data-distributed-compute) or real-time pipelines (use data-streaming).

How do I install the data-batch-processing skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the data-batch-processing skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare data-batch-processing with