Enqueuing Data Manually

Overview

You can use the Manual Input view to send test data to a running StreamBase application one tuple at a time, and watch the results in the Application Output View and the Application Input View.

The command-line equivalent of manual input is to start an sbc enqueue session on an input stream of a running application. You can then type the CSV equivalent of tuples that match that stream's schema.

When your application is running, StreamBase Studio queries the running server instance to determine the number of input streams, and the schema for each stream. The Manual Input view shows the application's input streams in the Input stream drop-down list, and shows the schema for the currently selected stream in the Field Values area.

Using the Manual Input View

In the example below, the input stream TradesIn is selected as the stream onto which data will be enqueued for the running firstapp.sbapp application. This input stream's schema had two fields, symbol and quantity, shown in the Field Values section.

The initial values in the input fields are shown as null, which is a reserved word to represent an empty value for this field in the tuple. This default setting is a convenience when enqueuing a tuple that contains many fields: you can let some fields remain as null, and enter non-null values only for certain fields that you know must not be null during your test of downstream components.

(For more information on using nulls, see Using Nulls in the Authoring Guide.)

If the selected input stream contains a blob field, the view provides a free-form text field where you can enter multiple lines of text to represent the blob data.

The following example shows values replacing the nulls.

The text in parentheses to the right of each field reminds you of the field's type and, for strings, its size. When you enter valid values for each of the fields in the tuple, Studio enables the Send Data button. When clicked, the tuple with the specified field values is enqueued to the specified input stream of the running application. Depending on the application design, sending the data may or may not produce a result in the Application Output view. By default, each tuple you send is logged to the Application Input view. You can disable logging sent tuples in the Input View by unchecking the Log to Application Input checkbox.

When you enter invalid values in a field, an error icon () appears to its right. The tooltip for the error icon indicates why the field value is incorrect. In the example below, the value entered for the string field is too long for the schema-specified 10 characters. Notice that Studio disables the Send Data button until the problem is fixed.

Back to Top ^

Manual Input of Nested Schemas

The Manual Input view supports manually entering data for schemas that include nested schemas. The nested schema can be specified as a named schema or a private schema. (See Schema Overview to understand these terms.)

Nested schemas can be specified as a private, unnamed schema, as shown in the following example of the Properties view's Edit Schema tab:

Nested schemas can also be specified with a named schema. The following schema definition shows a three-field schema, in which the third field is the named schema NYSE_named.

The data type of the third field, record_in, is tuple, as shown in the Streams tab of the Properties view:

When you run an application containing an input stream with this schema, the Manual Input view shows the tuple field in a table of its own, slightly offset under the containing schema. You can enter data for each field separately:

The subordinate fields in a field of type tuple can be set to null with a single checkbox, without having to clear each subordinate field:

Back to Top ^