Test Data Generation & Validation
FreeNo executable scriptsNot checkedGenerate real Cassandra 5.0 test data using Docker containers, export SSTables with proper directory structure, validate parsing against sstabledump, and…
by pmcfadin★ 22 GitHub starsAbout this skill
Test Data Generation & Validation
This skill provides guidance on generating real Cassandra 5.0 test data and validating parsing correctness.
When to Use This Skill
- Generating test data with specific schemas
- Creating test fixtures for property tests
- Exporting SSTables from Cassandra
- Validating parsed data against sstabledump
- Managing test datasets
- Creating reproducible test scenarios
Overview
CQLite uses real Cassandra 5.0 instances to generate test data, ensuring:
- Format correctness (real Cassandra writes)
- Edge case coverage (nulls, empty values, large values)
- Compression validation (actual compressed SSTables)
- Schema variety (all CQL types)
Test Data Workflow
See dataset-generation.md for complete workflow details.
Quick Start
Full corpus regeneration (recommended):
# Regenerates nb + oa + da keyspaces in one command
bash test-data/scripts/regenerate-datasets.sh
# With custom row count
bash test-data/scripts/regenerate-datasets.sh --rows 200
Compose-stack workflow (interactive / partial):
cd test-data
# 1. Start clean Cassandra 5 with schemas
./scripts/start-clean.sh
# 2. (Optional) run CQL inserts manually via cqlsh
docker exec -it cqlite-cassandra-5-0 cqlsh
# 3. Export SSTables + generate JSONL goldens
./scripts/export.sh
# 4. Shutdown and clean volumes
./scripts/shutdown-clean.sh
Generation Scripts
regenerate-datasets.sh (primary entrypoint)
Full corpus regeneration: nb + oa + da keyspaces, single Docker container.
What it does:
- Starts the pinned Cassandra container (
cassandra:5.0.8, seetest-data/scripts/lib/cassandra-image.sh) (cqlite-regen) - Applies schemas and inserts rows for nb keyspaces (CASSANDRA_4 compat mode)
- Restarts with
storage_compatibility_mode: NONE, creates oa keyspace - Restarts with
sstable.selected_format: bti, creates da keyspace - Exports SSTables via tar stream + generates sstabledump JSONL goldens
- Writes
metadata.yml
Options:
--rows N- Rows per nb table (default: 50)--out <dir>- Output directory (default: test-data/datasets)--dry-run- Print commands without executing
Example:
bash test-data/scripts/regenerate-datasets.sh
bash test-data/scripts/regenerate-datasets.sh --rows 200 --out /tmp/ds
bash test-data/scripts/regenerate-datasets.sh --dry-run
start-clean.sh
Starts Cassandra 5.0 container (via compose) and applies schemas.
What it does:
- Starts
cassandra-5-0container via docker-compose - Waits for Cassandra to be healthy
- Applies schemas from
schemas/core.list
Environment variables:
SCHEMA_SET=core- Use curated schema list (default)SCHEMA_SET=all- Use all *.cql files
Example:
./scripts/start-clean.sh
SCHEMA_SET=all ./scripts/start-clean.sh
export.sh
Exports SSTables from the running Cassandra container and generates reference files.
What it does:
- Runs
nodetool flushto write all memtables to disk - Streams SSTables from container to
datasets/sstables/via tar - Generates sstabledump JSONL golden files and sstablemetadata statistics
- Writes
metadata.ymlusing cqlsh (no external generator container needed) - Writes
references.ymlmanifest
Output structure:
test-data/datasets/
├── metadata.yml
├── references.yml
└── sstables/
├── test_basic/
│ └── simple_table-<hash>/
│ ├── *-Data.db
│ ├── *-Data.db.jsonl # sstabledump golden
│ ├── *-Index.db
│ ├── *-Statistics.db
│ └── *-TOC.txt
├── test_collections/
└── test_timeseries/
shutdown-clean.sh
Stops Cassandra and removes Docker volumes.
What it does:
- Stops all containers
- Removes Docker volumes (clean slate)
- Prepares for next generation cycle
Use when:
- Done with current dataset
- Want to regenerate from scratch
- Cleaning up after tests
Test Schemas
Schemas in test-data/schemas/:
basic-types.cql
Simple table with all primitive types:
- Partition key: uuid
- No clustering
- Columns: int, text, timestamp, boolean, etc.
collections.cql
Collection types:
- list
- set
- map<text, int>
- Nested frozen collections
time-series.cql
Time-series pattern:
- Partition key: sensor_id
- Clustering: timestamp (DESC)
- Columns: temperature, humidity, pressure
wide-rows.cql
Wide partition testing:
- Single partition key
- Many clustering rows (1000+)
- Tests pagination and offset handling
Custom Schemas
Add your own:
# Create schema
echo "CREATE TABLE test_keyspace.my_table (...);" > schemas/my-schema.cql
# Add to core.list
echo "my-schema.cql" >> schemas/core.list
# Generate
bash test-data/scripts/regenerate-datasets.sh
Validation Workflow
See validation-workflow.md for complete validation process.
Validate Against sstabledump
# 1. Generate sstabledump reference
sstabledump test-data/d
Install Test Data Generation & Validation 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
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the Test Data Generation & Validation skill do?
Generate real Cassandra 5.0 test data using Docker containers, export SSTables with proper directory structure, validate parsing against sstabledump, and manage test datasets. Use when working with test data generation, dataset creation, SSTable export, validation, fixture management, or sstabledump comparison.
How do I install the Test Data Generation & Validation 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 Test Data Generation & Validation skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create 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…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic