Parser Pattern Structure - trillium_discovery - trillium_quality - 17.2

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Trillium > Trillium Quality
Version
17.2
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
First publish date
2008
Last updated
2024-07-01
Published on
2024-07-01T08:56:48.630530

Patterns used for parsing have a specific, meaningful structure. This topic describes the structure and syntax for the CDP and the BDP patterns.

Customer Data Parser

The CDP pattern structure comprises one or two lines. By default, the CDP uses definitions included in the read-only Standard Definitions table. You can create new patterns in the Customized Definitions table in the Parser Tuner.

Example

‘ALPHA ALPHA’ PATTERN NAME DEF

REC=’GVN-NM1(1) SRNM(1)’

First Line

The first line in a pattern entry has the following elements:

  • Inbound combination of tokens. This is the combination of attributes the Parser program will attempt to find in the table. If the exact matching combination of attributes is found, the program changes the values on output to match the values defined in the RECODE portion of the pattern.

In the following example, two words containing letters only are present, such as two names. The actual data entry could be ‘John Smith’ and the required association to the pattern would be:

John

Smith

ALPHA

ALPHA

Here, both words are identified as ALPHA attributes. This portion of the entry must be enclosed in single quotes: ‘ALPHA ALPHA’

  • Keyword indicating this is a pattern. For example, ‘ALPHA ALPHA’ PATTERN NAME.
  • Keyword indicating to which line type this pattern entry applies. Valid line type keywords are NAME, STREET, and MISC.

Second Line

The second line of a pattern entry is optional. Both sets of elements can be on one line. The following elements can appear on a second line:

  • The recode keyword followed by an ‘=’ symbol. The attribute values that follow this keyword redefine the tokens from their inbound values. For example:

    REC=’GVN-NM1(1) SRNM(1)’

  • The outbound pattern recode values. This is the combination of attribute values the Parser uses on output for the data provided on this line. The values that follow the recode value must be enclosed in single quotes. Name lines require the name number following each attribute name.

    REC=’GVN-NM1(1) SRNM(1)’

Note: Do not include the following values within the single quotes of the recode value: equal sign (=), single quote ('), double quote ("), and comma (,).

Business Data Parser

BDP patterns are displayed across three lines. All user-defined word, phrase, mask, synonym, and pattern definitions are written to the Customized Definition table. This file is viewed and edited in the Parser Tuner.

Example

'PCODE SIZE PRODUCT ALPHA BRAND'

PATTERN MISC DEF

RECODE='PCODE SIZE PRODUCT COLOR BRAND'

First Line

Inbound combination of tokens. The first line shows the inbound combination of categories (attribute types) and/or intrinsic attributes that the Parser will attempt to match to table definitions; for example, 'PCODE SIZE PRODUCT ALPHA BRAND'. If the exact matching combination is found, the Parser changes the values on output to match the values defined in the RECODE portion of the pattern (third line).

Second Line

Keyword indicating this is a pattern. The second line displays the keyword identifying the pattern as such; for example, PATTERN MISC DEF. By default, all BDP patterns have a line type of MISC. When creating a substring pattern, the second line includes a Parser attribute definition; for example, INSERT SUB-PAT MISC DEF ATT=BRAND.

Third Line

The outbound pattern recode values. The third line specifies the defined outbound pattern recode values. The values that follow RECODE= must be enclosed in single quotes. The example is a defined business data pattern, where the intrinsic attribute ALPHA has been matched and defined (recoded) to the category COLOR.