Use the SQL statement below to connect RisingWave to the built-in load generator.Documentation Index
Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
Use this file to discover all available pages before exploring further.
Syntax
WITH options - columnparameter[]
The following table shows the data types that can be generated for each load generator type.
| Generator \ Data | Number | Timestamp | Timestamptz | Varchar | Struct | Array |
|---|---|---|---|---|---|---|
| Sequence | ||||||
| Random |
- Number
- Timestamp and Timestamptz
- Varchar
- Struct
- Array
- Sequence
- Random
The sequence load generator can generate numbers, incremented by 1, from the starting number to the ending number. For example,
1, 2, 3, … and 1.56, 2.56, 3.56, …Specify the following fields for every column.| column_parameter | Description | Value | Required? |
|---|---|---|---|
| kind | Generator type. | Set to sequence. | False. Default: random |
| start | Starting number must be smaller than the ending number. | Any number of the column data type. Example: 50 | False. Default: 0 |
| end | Ending number must be larger than the starting number. | Any number of the column data type. Example: 100 | False. Default: 32767 |
Example
Here is an example of connecting RisingWave to the built-in load generator. The following statement creates a sources1 with five columns:
i1— An array of three integers starting from 1 and incrementing by 1v1— Structs that contain random integersv2ranging from -10 to 10 and random floating-point numbersv3ranging from 15 to 55t1— Random timestamps from as early as 2 hours as 37 minutes prior to the generator execution timez1- Random timestamps with timezones from as early as 2 hours as 37 minutes prior to the generator execution timec1— Random strings with each consists of 16 characters
s1 after a few seconds.