4
Patterns Query Configuration: uses the input to the process (“queryString”) to query against a Patterns Table called “names”. It matches against the “first” and “last” field using a Predicate filter of “concat('"',$Start/queryString, '" I_IN $"first" OR "', $Start/queryString, '" I_IN $"last"')”. The Predicate filter will filter out any records that do not contain an insensitive case of “abc” in either of the “first” or “last” field. The “I_IN” of the Predicate means a case insensitive exact match within these fields using the “queryString”. Notice the “OR” specified for either field of interest. When processed by BW, the Predicate filter will be equal to "ABC" I_IN $"first" OR "ABC" I_IN $"last" which is what the Patterns server will process.

b w Process Read Me for Exact Start Query

Embed Size (px)

DESCRIPTION

BWProcessReadmeForExactStartQuery

Citation preview

Page 1: b w Process Read Me for Exact Start Query

Patterns Query Configuration: uses the input to the process (“queryString”) to query against a Patterns Table called “names”. It matches against the “first” and “last” field using a Predicate filter of “concat('"',$Start/queryString, '" I_IN $"first" OR "', $Start/queryString, '" I_IN $"last"')”. The Predicate filter will filter out any records that do not contain an insensitive case of “abc” in either of the “first” or “last” field. The “I_IN” of the Predicate means a case insensitive exact match within these fields using the “queryString”. Notice the “OR” specified for either field of interest. When processed by BW, the Predicate filter will be equal to "ABC" I_IN $"first" OR "ABC" I_IN $"last" which is what the Patterns server will process.

Page 2: b w Process Read Me for Exact Start Query

Note: The “start” node accepts a query string that will be used by the Patterns Query and the Mapper activity to format the response according to your requirements. This is the output from the Patterns Query. There are 4 record that contain an “abc” in either the “first” or “last” field.

Page 3: b w Process Read Me for Exact Start Query

Mapper activity configuration: Performs a transformation on the Patterns Query Output to whatever format you require. In this case it only includes the “first” and “last” fields in a Complex Element that is repeating. Note that the “if” tests for the start of the “queryString” in either of the “first” or “last” field and if true it will be included in the response document or output of the Mapper activity.

Page 4: b w Process Read Me for Exact Start Query

Note: This is the output of the Mapper activity. It transforms the output of the Patterns Query activity as well as eliminates any records that do not start with “abc” in either the “first or “last” field, therefore record with a “RecordKey” of “3” is dropped. The output of the Mapper would then be returned via the “End” node.