How to extract a nested tuple field using wildcard expressions

How to extract a nested tuple field using wildcard expressions

book

Article ID: KB0074741

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

If I have a Tuple which itself contains a nested tuple, how can I emit just that nested tuple?

Issue/Introduction

The '.*' field syntax returns all fields from a nested tuple.

Resolution

For example, if you have Map "input1" with Var1(string) and Var2(SomeTuple), to emit just "SomeTuple"-fields as a non-nested tuple use a wildcard Map expression.

In a Map's StreamBase Properties view, Output Settings tab, set: 
  Input Fields: None
  Additional Expressions:
  Action: Add
  Field Name: *
  Expression: Var2.*
as so:
User-added image

This emits all the nested fields as top-level fields.  

Wildcard expansion of a tuple is described in the Help at:
  TIBCO StreamBase Documentation > StreamBase References > StreamBase Expression Language Features, "Wildcards in EventFlow Expressions"