Random Tuples Generator Input Adapter

Adapter type: randomtuplegen_in. The Random Tuples Generator adapter generates random tuples according to the given schema and sends the rows to the stream.

A tuple is an ordered list of elements, or in other words, a row of data. A row that has two column values is a 2-tuple, and generally, a row that has n column values is an n-tuple. The adapter is primarily used for prototyping and basic testing of Event Stream Processor. You can edit both the schema and configuration file.

If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.

Property Label Description
Rate

Property ID: Rate

Type: uint

(Optional) Number of rows generated per second. Must be between 0 (inclusive) and 1,000,000 (inclusive).

If Rate is negative, the adapter stops and returns a fatal error message to the Server.

If Rate is larger than the maximum value, it resets to the maximum and reports a warning message to the Server.

If Rate property is blank, it resets to the default value and reports a message.

Default value is 100.

Row Count

Property ID: RowCount

Type: uint

(Optional) Specifies number of generated rows. Must be between 0 and 2,000,000,000 inclusive.

If RowCount is negative, the adapter stops and returns a fatal error message to the Server.

If RowCount is larger than the maximum value, it resets to the maximum and reports a warning message to the Server.

If RowCount property is blank, it resets to the default value and reports an information message to the Server.

Default value is 0, which represents an infinite number of rows.

Timestamp Base

Property ID: TimestampBase

Type: string

(Optional) Initial time for message timestamps. The supported format of TimestampBase is %Y-%m-%dT%H:%M:%S.

If TimestampBase is blank, it resets to default value and the adapter initializes immediately. Similarly, the adapter initializes immediately if the TimestampBase value is earlier than current time.

If TimestampBase value is later than current time, the adapter sleeps until then.

If TimestampBase has an invalid timestamp format, the adapter stops and returns a fatal error message to the Server.

Default value is the current time.

Date Format

Property ID: DateFormat

Type: string

(Optional) Format string for parsing date values. Default value is %Y-%m-%d %H:%M:%S.

Timestamp Format

Property ID: TimestampFormat

Type: string

(Optional) Format string for parsing date values. Default value is %Y-%m-%d %H:%M:%S.

PropertySet

Property ID: propertyset

Type: string

(Advanced) Specifies the name of the property set. Property sets are reusable sets of properties that are stored in the project configuration file. Using these sets allows you to move adapter configuration properties out of the CCL file and into the CCR file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value.

Block Size

Property ID: blockSize

Type: int

(Advanced) Determines the number of records in each block. Applies to transaction and envelope modes. Default value is 0.

Use Envelopes

Property ID: useEnvelopes

Type: boolean

(Advanced) Specify the block type the adapter uses to pass data to the engine. If you specify a blockSize property greater than zero, by default, the adapter packages rows into transaction blocks to send to the engine. To get the adapter to package rows into envelope blocks instead, set this property to true. Default value is false.

The data this adapter generates is not evenly distributed across the range of possible values for each datatype. This table shows the value range generated for each datatype:

Datatype

Range of values

bigdatetime

Current time with microseconds

binary

2 bytes each with range 0 to 255

boolean

true/false

date

Current time with seconds

decimal

0.0 to 10.0 exclusive (should never get 10.0)

float

0.0 to 10.0 exclusive (should never get 10.0)

integer

0 to 99 inclusive

interval

0 to 9 inclusive

long

0 to 99 inclusive

money

0.0000 to 3.2767

money1

0.0 to 3276.7

money2

0.00 to 327.67

money3

0.000 to 32.767

money4

0.0000 to 3.2767

money5

0.00000 to 0.32767

money6

0.000000 to 0.032767

money7

0.0000000 to 0.0032767

money8

0.00000000 to 0.00032767

money9

0.000000000 to 0.000032767

money10

0.0000000000 to 0.0000032767

money11

0.00000000000 to 0.00000032767

money12

0.000000000000 to 0.000000032767

money13

0.0000000000000 to 0.0000000032767

money14

0.00000000000000 to 0.00000000032767

money15

0.000000000000000 to 0.000000000032767

string

2 characters from the following ranges a..z, A..Z, 0..9

time Current time with seconds
timestamp Current time with milliseconds
Note: Values are not necessarily evenly distributed within these ranges.