Random Tuples Generator Adapter

The Random Tuples Generator adapter –sometimes called the Random Messages Generator – is an input-only adapter that generates random tuples according to the given schema and sends the rows to the stream.

The Random Tuples Generator Adapter is primarily used for prototyping and basic testing. Both its schema and configuration file are user-editable.

The following configurable parameters are defined in RandomTupleGenInAdapter.xml:

Property Name (Screen)

Property Name (Attach Adapter)

Type

Description

Rate

Rate

Float

MIN: 0

MAX: 1,000,000

Default: 100

Optional.

The number of Rows generated per second.

If the rate is negative, the adapter will stop and return a fatal error message to the server.

If the rate is larger than the MAX value, it will reset to the MAX value and report a warning message to the server.

If the rate parameter is blank, it will reset to the Default value and report an info message.

Row Count

RowCount

Long

MIN: 0

MAX: 2,000,000,000

DEFAULT: 0 (infinity)

Optional.

How many rows to generate.

If RowCount is negative, the adapter will stop and return a fatal error message to the server.

If RowCount is larger than the MAX value, it will reset to the MAX value and report a warning message to the server.

If the RowCount parameter is blank, it will reset to the default value and report an info message to the server.

Timestamp Base

TimestampBase

Current time

Optional.

The initial time for message timestamps.

The supported format of Timestamp is YYYY-MM-DD HH24:MI:SS:FF

If TimestampBase is blank, it will reset to the default value.

If TimestampBase has an invalid timestamp format, the adapter will stop and return a fatal error message to the server.

Data generated by this adapter is not evenly distributed across the range of possible values for each data type. The following table shows the value range generated for each data type:

Data Type

Range of Values

Bool

true/false

Int

0 .. 99 inclusive

Long

0 .. 99 inclusive

Float

0.0 .. 10.0 exclusive (should never get 10.0)

Interval

0 .. 9 inclusive

Timestamp

Sets value to current time

CharPtr

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

BlobPtr

2 bytes each with range 0..255

Note: Even within this range, values are not necessarily evenly distributed.