Tuple StreamΒΆ

A tuple stream is the generic form of typed and structured data used by SpectX for query processing. The structure of a tuple is determined by exported fields in the pattern used to extract and transform (i.e parse and type assignment) the input data. Therefore, the structure of a tuple is analogous to the table in a relational database: the fields of a tuple represent the columns of a table.

Tupleset streams can appear as a result of a creation (for instance, parsing unstructured input data) or a transformation (adding, modifying or removing fields or rows of an existing tuple stream). In simple terms, you can think of the script execution as a chain of actions where each action passes its result to the next. To begin, you have to create an initial tuple stream by parsing out the desired fields from your input data files. Next, you apply structured query language statements to perform analytics, transforming the input tuple stream with each statement. The last statement will output its resulting tuple stream to the screen (or to SpectX REST API).

The following commands create a tuple stream:

  • LIST performs Listing of input resources
  • PARSE performs extract and transform of exported fields of the specified pattern
  • VALUE converts input string arguments to typed values desired, producing a set of one or more tuples
  • GREP searches a given string in given input files
  • DUAL is a built-in data generator

An existing tuple stream can be referred or manipulated by query statements.