Populate Table

Simple (testing/QA) data generator for tables.

For each column, the dialog shows the column name, the type, and a dropdown box to select what to put in it. If the column is an integer primary key, the dropdown box is prefilled with Autonumber; if the column is plain integer, the the dropdown box is prefilled with Random number; otherwise the dropdown box is prefilled with Random Text. A full list of possibilities is shown below. If the table already has data in it, new rows will be added, usually at the end, but the sqlite specification explicitly does not guarantee this.

Populate Table dialog

If the table was initially empty, the result looks like this:-

Populate Table result
Number of Rows to Populate

Specify the number of records to be created. The Populate button is not enabled unless the nunber of rows is at least 1.

Continue on Error

If it's checked, the data population will continue after error.

If it's unchecked the process will stop right after the first error.

Important

Why there could be errors? It's simple. Sqlite doesn't supply any way to check e.g. constraints, or trigger modification on the table before the statement is run. So an error can be raised when a constraint is violated, for example when you want to insert a number which has already been used into a PRIMARY KEY AUTOINCREMENT column.
Column Settings

Specify an action for each column.

Column Settings

Autonumber

Insert MAX()+1 for current number based column. Values inserted are unique, so it should be used for Primary Keys, Autonumber columns and columns with unique indexes.

Random Number

Insert pseudo random number into column. If there is a size setting for this column (e.g. NUMBER(3)) the size is used.

Random Text

Insert random text string into column. If there is a size setting for this column (e.g. VARCHAR2(3)) the size is used.

Prefixed Text

Insert text string with custom prefix. For example set the prefix as "testvalue_" then you'll get sequence of values: "testvalue_1", "testvalue_2", ..., "testvalue_N".

Static Value

Insert custom constant value for all new records for current column.

Date as Text - Now

Insert the current date and time as a text string.

Date Unix Epoch (integer) - Now

Insert the current date and time as integer seconds since the Unix epoch [1970-01-01 00:00:00 +0000 (UTC)].

Date Julian (real) - Now

Insert the current date and time as a fractional Julian day since noon in Greenwich on November 24, 4714 B.C.

Date as Text - Random

Insert a random date and time as a text string.

Date Unix Epoch (integer) - Random

Insert a random date and time as integer seconds since the Unix epoch [1970-01-01 00:00:00 +0000 (UTC)].

Date Julian (real) - Random

Insert a random date and time as a fractional Julian day since noon in Greenwich on November 24, 4714 B.C.

Ignore Column

Skip this column. No data will be inserted except default values for columns.

Warning

Remember that constraints are still active in the table. E.g. when you set a NOT NULL constrained column with Ignore Column option, you'll get a Constraint Violated error.