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…
от j4flmao★ 47 звёзд на GitHub
Установить data-batch-processing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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,
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- 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
Что делает скилл 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 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).
Как установить скилл data-batch-processing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл data-batch-processing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…