Generate from schema
Generate synthetic datasets from a schema specification using the Rockfish SDK. Use when a user wants to create synthetic tabular or time-series data with specific structure — independent or derived columns, state machines, timeseries, entity relationships (including composite foreign keys), or realistic PII-like values (names, emails, addresses, SSNs) via NamedEntityProvider. Trigger on phrases like "generate synthetic data", "fake data from a schema", "create a test dataset", "GenerateFromDataSchema", or mentions of entity/foreign-key/state-machine data.From its SKILL.md
npx -y skills add Rockfish-Data/tacklebox --skill generate-from-schemaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.0 KB, 784 tokens by cl100k_base, as published. Nobody here has run it
Generate from schema
Use rockfish.actions.GenerateFromDataSchema to produce synthetic datasets from a schema specification.
When to use this skill
Use when the user wants to generate synthetic tabular or time-series data with:
- Specific column types (IDs, categoricals, numeric distributions).
- Derived columns (computed from other columns — e.g. mapping or sampling).
- Stateful behavior (state machines or timeseries).
- Cross-entity relationships (foreign keys, including composite keys).
- Realistic PII-like values (names, emails, addresses, SSNs).
If the user wants to inject scenarios (spikes, outages, ramps, shifts) into an existing time-series dataset, use the inject-scenarios skill instead.
Concept
rockfish.actions.GenerateFromDataSchema takes a DataSchema and produces one synthetic dataset per Entity. A schema is a tree:
DataSchema
├── entities: list[Entity]
│ ├── name, cardinality
│ ├── columns: list[Column]
│ │ ├── name, data_type
│ │ ├── column_type (independent | derived | stateful | foreign_key)
│ │ └── domain (id | categorical | uniform_dist | state_machine
│ │ | timeseries | named_entity_provider | ...)
│ └── (optional) timestamp
├── entity_relationships: list[EntityRelationship]
└── (optional) global_timestamp
How to use
- Construct a
DataSchemamatching the user's data requirements. Two equivalent forms:- JSON dict — convenient for simple cases, language-agnostic.
- Typed dataclasses (
DataSchema,Entity,Column,Domain, ...) — validated at construction, better for complex schemas.
- Wrap it in
ra.GenerateFromDataSchema.Config(schema=..., upload_datasets=True). - Run via
WorkflowBuilder().add(generate).start(conn). - Pull results back with
workflow.datasets().
Connection
async with rf.Connection.from_config() as conn:
...
from_config() reads ~/.config/rockfish/config.toml or ROCKFISH_* env vars. The async with ensures the underlying HTTP session is closed cleanly.
Worked example
See examples/entity-gen.py for a runnable script with four cases:
- Simple device schema (JSON dict) — independent + derived columns.
- User sessions (typed dataclasses) — state machine + timeseries + foreign key.
- Trades (typed dataclasses) — composite foreign key.
- Customers (typed dataclasses) —
NamedEntityProviderfor realistic PII-like values, with a multilingual variant.
Run one example at a time:
python examples/entity-gen.py -e 2
Gotchas
- Cardinality vs. row count:
Entity.cardinalityis the number of source rows generated for that entity before any sampling/expansion via relationships. Asessionsentity referencingusershas its own cardinality independent ofusers.cardinality. - State machines need a
trigger_column_name: the column named there appears in the output alongside the state column. - Composite foreign keys: declare each FK column with
column_type=FOREIGN_KEYand bind them inEntityRelationship.join_columns— the parent-side columns aren't repeated in the child entity'scolumnslist. NamedEntityProvideruniqueness: passunique_values=N, with_replacement=Falsewhen you need uniqueness in the generated pool (e.g. emails, SSNs).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.