Skip to main content

Using event transformers

Event transformers are a graphical alternative to CQs (see CREATE CQ (query)) for modifying data flows. For the transformers discussed in this section, the input stream must have a user-defined type.

If you convert a transformer to a CQ, you cannot convert it back to a transformer.

Field Adder
FieldAdder.png

Adds one or more fields and creates a corresponding type for the output stream. For each field, enter a name, select a data type, and enter an expression.

Expressions may use the same Operators and Functions as CQ SELECT statements. Enclose literal string values in quotes.

Field Enricher
FieldEnricher.png

Joins fields from a stream with fields from a cache, event table, WActionStore, or window (see Joins). Select a stream from Input, another component from Enrichment Component, and the fields to join on from Input Field and Enrichment Component Field. All the fields from both components will appear in Output Fields (Input fields will start with i_ and Enrichment Component fields with e_.) Delete any fields you don't want by clicking x and reorder them as you like by dragging up or down. Optionally, click Convert to CQ to specify a particular type of join (see CREATE CQ (query)).CREATE CQ (query)

Field Masker

See Masking functions.Masking functions

Field Remover
FieldRemover.png

Removes one or more fields and creates a corresponding type for the output stream. Click the X to remove a field. Click RESET to start over.

Field Renamer
FieldRenamer.png

Renames one or more fields and creates a corresponding type for the output stream.

Field Splitter
FieldSplitter.png

Splits a string field into multiple string fields using the specified delimiter. The delimiter may include any combination of alphanumeric characters, spaces, and punctuation.

Field Type Modifier
TypeModifier.png

Changes the data type of one or more fields and creates a corresponding type for the output stream.

The following conversions should work without problems. Others may cause the application to terminate.

Input type

Output type

Byte

Double, Integer, Float, Long, Short, or String

DateTime

String

Double

String

Float

Double or String

Integer

Double, Float, Long, or String

Long

Double, Float, or String

Short

Double, Integer, Float, Long, or String

String

Byte, Double, Float, Integer, Long, or Short, provided the values are compatible

Field Value Filter
FieldValueFilter.png

Filters the output stream based on one or more specified conditions. Each additional condition narrows the criteria, so for the output for the example above, the output will contain events with amounts from $5,000 to $10,000.

To DB Event
ToDBEvent.png

Converts events of a user-defined type to WAEvent format. The output stream's type is WAEvent and can be used as the input for a target using DatabaseWriter or another writer accept input from DatabaseReader, IncrementalBatchReader, or a SQL CDC source. In the output, the table name will be the value of the metadata TableName field. In this release, the value of the metadata OperationName field will always be INSERT.

For example, using the settings shown above, the following input event:

PosDataStream_Type_1_0{
  merchantId: "D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu"
  dateTime: 1363134730000
  amount: 2.2
  zip: 41363
};

would be output as:

WAEvent{
  data: ["D6RJPwyuLXoLqQRQcOcouJ26KGxJSf6hgbu",1363134730000,2.2,41363]
  metadata: {"TableName":"mydb.mytable","OperationName":"INSERT"}
  userdata: null
  before: null
  dataPresenceBitMap: "Dw=="
  beforePresenceBitMap: "AA=="
  typeUUID: {"uuidstring":"01e91cfe-b88a-8ef1-8e39-8cae4cf129d6"}
};