Acquire / generate · All operations

Emit a fixed number of rows

A variant of Generate rows

Emit N empty, blank or identical rows, or an empty table with set columns.

Status

In arcform

Runs as a SQL step

arcform carries it as a sql: step today.

The DuckDB step

Emit a number of identical, empty or blank rows and an empty table with set columns

SQL
CREATE TEMP TABLE identical AS SELECT 'x' AS v FROM range(3);
CREATE TEMP TABLE empty_rows AS SELECT NULL::VARCHAR AS a, NULL::INTEGER AS b FROM range(4);
CREATE TEMP TABLE blank_rows AS SELECT ''::VARCHAR AS a FROM range(2);
CREATE TEMP TABLE no_rows (id INTEGER, name VARCHAR, joined DATE);
SELECT * FROM identical; SELECT * FROM empty_rows; SELECT * FROM blank_rows; SELECT * FROM no_rows;
SELECT CASE WHEN ((SELECT count(*) = 3 AND count(DISTINCT v) = 1 FROM identical) AND (SELECT count(*) = 4 AND count(a) = 0 AND count(b) = 0 FROM empty_rows) AND (SELECT count(*) = 2 AND count(a) = 2 AND max(length(a)) = 0 FROM blank_rows) AND (SELECT count(*) FROM no_rows) = 0 AND (SELECT list(column_name || ' ' || column_type) FROM (DESCRIBE no_rows)) = ['id INTEGER', 'name VARCHAR', 'joined DATE']) THEN 'as expected' ELSE error('the rows were not 3 identical, 4 empty and 2 blank, or the empty table did not keep its 3 typed columns') END AS verdict;
  • The statement builds its own data.
  • It needs nothing installed beyond DuckDB itself.
  • The statement checks its own result and raises an error when it is wrong: “the rows were not 3 identical, 4 empty and 2 blank, or the empty table did not keep its 3 typed columns”.
  • It passed on DuckDB v2.0.0 (Cyanoptera) d54cbbe3df.

What other tools call it

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

Apache Hop (1)
  • Row Generatorread 2026-09-27

    Emit a fixed number of rows, empty or holding constant fields

Apache NiFi (1)
  • DuplicateFlowFileread 2026-09-27

    Load-testing aid: emit a configured number of copies of each incoming FlowFile

DuckDB (2)
  • repeatread 2026-09-27

    repeat table function

  • repeat_rowread 2026-09-27

    repeat_row table function

KNIME Analytics Platform (1)
Pentaho Data Integration (1)
  • Generate Rowsread 2026-09-27

    Emit a fixed number of empty or identical rows

Polars (1)
  • DataFrame.clearread 2026-09-27

    Make an empty copy with the same schema, or one of n all-null rows

Background

In DuckDB, repeat(value, count) returns a table with count rows, each containing the value.[1] In Apache Hop, the Generate rows transform outputs a specified number of rows, which are empty by default but can hold a set of hard-coded fields.[2]

When to use it

Apache Hop's Generate rows transform is used primarily for testing, and can generate a fixed number of rows, such as exactly 12 rows for 12 months.[2] In Apache Hop, a transform needs a data row to use fields or print variables, and a Generate rows transform can create that row when none exists.[2] In Apache Hop, Generate rows can make one row holding a few field values that parameterise the SQL which then generates the real rows.[2]

KNIME's Table Structure Creator node creates an empty table with set column names and data types, and holds no data rows.[3] KNIME's Table Structure Creator can be used with the Concatenate node to guarantee that a table contains the columns that later nodes depend on.[3] Reach for an empty table with set columns when a later step must find its columns even on a day when no rows arrive. (Meridian's view)

In DuckDB, count(arg) returns the number of rows where arg is not NULL.[4] Fill an empty row with NULLs when it means no value, and with empty strings only when an empty text is itself the value. (Meridian's view) Generate identical rows to test how a step copes with volume, and varied or random rows to test what it does with different values. (Meridian's view)

The method

In DuckDB, repeat_row returns a table of num_rows rows, each containing the fields given as its other arguments, so repeat_row(1, 2, 'foo', num_rows = 3) gives three rows of 1, 2, 'foo'.[1] In Apache Hop, every row that the Generate rows transform produces carries the same constants.[2] In Apache Hop, a Generate rows transform followed by an Add sequence transform can make 100 rows to loop through.[2] Apache Hop's Generate rows transform has an option never to stop generating rows, with a set interval in milliseconds, to drive recurring tasks such as polling a file, queue or database.[2]

Compared with the alternatives

In DuckDB, a CROSS JOIN has no conditions and returns all the possible pairs of rows.[5] Cross join a table with a generated table of N rows when every row should appear N times; generate the N rows on their own when nothing needs repeating but the row itself. (Meridian's view)