# Generate random or synthetic data

Acquire / generate

A variant of [Generate rows](https://meridian.online/operations/generate-rows).

Generate rows or columns of random, fake or simulated values for testing.

Page: <https://meridian.online/operations/generate-rows/generate-random-or-synthetic-data>

## Status

Runs as a SQL step.

arcform carries it as a `sql:` step today.

## The DuckDB step

generate seeded random numbers, fake names and a normal sample

```sql
SELECT setseed(0.42);
CREATE TEMP TABLE first_run AS
SELECT i, random() AS u, (['Ann', 'Bo', 'Cy', 'Di'])[1 + (random() * 4)::INTEGER % 4] AS first_name
FROM range(1000) t(i);
SELECT setseed(0.42);
CREATE TEMP TABLE second_run AS
SELECT i, random() AS u, (['Ann', 'Bo', 'Cy', 'Di'])[1 + (random() * 4)::INTEGER % 4] AS first_name
FROM range(1000) t(i);
-- simulated values: a normal sample by the Box-Muller transform from two uniforms
SELECT setseed(0.42);
CREATE TEMP TABLE normal AS
SELECT sqrt(-2 * ln(1 - random())) * cos(2 * pi() * random()) AS z FROM range(2000);
SELECT * FROM first_run LIMIT 3;
SELECT CASE WHEN ((SELECT count(*) = 1000 AND min(u) >= 0 AND max(u) < 1 AND count(DISTINCT u) = 1000 AND count(DISTINCT first_name) = 4 FROM first_run) AND (SELECT count(*) FROM first_run a JOIN second_run b USING (i) WHERE a.u = b.u AND a.first_name = b.first_name) = 1000 AND (SELECT abs(avg(z)) < 0.1 AND stddev_pop(z) BETWEEN 0.9 AND 1.1 FROM normal)) THEN 'as expected' ELSE error('the seeded run did not repeat exactly, or the uniforms, the four fake names or the normal sample were out of range') END AS verdict;
```

The statement builds its own data.

It needs nothing installed beyond DuckDB itself.

## What other tools call it

Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).

- Alteryx Designer: [`Synthetic Input`](https://help.alteryx.com/current/en/designer/tools/ai-tools/synthetic-input-tool.html) (read 2026-09-27)
- Apache Hop: [`Fake data`](https://hop.apache.org/manual/latest/pipeline/transforms/fake.html) (read 2026-09-27)
- Apache Hop: [`Generate Random Value`](https://hop.apache.org/manual/latest/pipeline/transforms/generaterandomvalue.html) (read 2026-09-27)
- KNIME Analytics Platform: [`Data Generator`](https://api.hub.knime.com/nodes/*wgKGTmxpx4F7BiFm?details=full) (read 2026-09-27)
- KNIME Analytics Platform: [`KNIME Data Generation (extension)`](https://api.hub.knime.com/extensions/org.knime.features.datageneration) (read 2026-09-27)
- mlpack: [`mlpack_gmm_generate`](https://www.mlpack.org/doc/user/bindings/cli.html) (read 2026-09-27)
- mlpack: [`mlpack_hmm_generate`](https://www.mlpack.org/doc/user/bindings/cli.html) (read 2026-09-27)
- Apache NiFi: [`GenerateFlowFile`](https://nifi.apache.org/components/org.apache.nifi.processors.standard.GenerateFlowFile/) (read 2026-09-27)
- Apache NiFi: [`GenerateRecord`](https://nifi.apache.org/components/org.apache.nifi.processors.standard.GenerateRecord/) (read 2026-09-27)
- Pentaho Data Integration: [`Generate random credit card numbers`](https://docs.pentaho.com/pdia-data-integration/9.3-data-integration/pdi-transformation-steps-reference-overview) (read 2026-09-27)
- Pentaho Data Integration: [`Generate random value`](https://docs.pentaho.com/pdia-data-integration/9.3-data-integration/pdi-transformation-steps-reference-overview) (read 2026-09-27)
- Polars: [`polars.testing.parametric (family)`](https://docs.pola.rs/api/python/stable/reference/testing.html) (read 2026-09-27)
- RapidMiner Studio: [`Build Simulation`](https://docs.rapidminer.com/latest/studio/operators/extensions/Operator%20Toolbox/blending/build_simulation.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Churn Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_churn_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Data (ARIMA)`](https://docs.rapidminer.com/latest/studio/operators/modeling/time_series/utility/generate_data_arima.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Direct Mailing Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_direct_mailing_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Massive Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_massive_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Multi-Label Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_multi_label_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Nominal Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_nominal_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Sales Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_sales_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Team Profit Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_team_profit_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Transaction Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_transaction_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Transfer Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_transfer_data.html) (read 2026-09-27)
- RapidMiner Studio: [`Generate Up-Selling Data`](https://docs.rapidminer.com/latest/studio/operators/utility/random_data_generation/generate_up_selling_data.html) (read 2026-09-27)
- Talend: [`tRowGenerator`](https://help.qlik.com/talend/en-US/components/8.0/trowgenerator/trowgenerator-component) (read 2026-09-27)
- Yggdrasil Decision Forests: [`synthetic_dataset`](https://github.com/google/yggdrasil-decision-forests/blob/0a54b57c95ff0cf42ecf0310ace0513a4f32cb65/yggdrasil_decision_forests/cli/utils/synthetic_dataset.cc) (read 2026-09-27)
