Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By the end of this chapter you will be able to:

  • Use a Merge merge Stream with data enrichment via a lookup pipe

In this exercise you will merge some address information – and in the same Stream stream you will further enrich the data by looking up the postcode for each record.

...

...

Merge address and customer category data

Merge addresses and customer categories stored in the database:

  • Create a new model called Build full customer details
  • Drag on the datasource CRM
  • Create a database collector and stream to read data into CenterView PhixFlow from following tables in the CRM datasource:
    • SOURCE_ADDRESS_LIST
    • SOURCE_CC_LIST
  • Merge these two streams:
    • Select both streams
    • Right-click on the model pane background and select Merge Selected Streams
    • Call the
    • new
    • merge stream Full Addresses
    • In the merge attributes form that pops up drag NAME into both boxes – we will merge the data from the two sources on the NAME field
    • Press Image Removed
    • In the Automatic Stream Configuration form accept the default (All Attributes) and press Image Removed
    Double-click the merge stream that is created – you will see the key field (NAME) has the expression
    • Merge on the attribute NAME from both input streams
    • Drag other attributes from the input streams into the merge stream so that you have a full set of data for each customer
  • In the merge stream, for the attribute NAME set the expression to: _key[1]
  • Run analysis on Full Addresses and view the results

...

Enrich addresses with postcodes

You will now further enrich the address data with post codes:

  • Again using the Datasource datasource CRM, create a collector and stream to load into CenterView PhixFlow data from the table SOURCE_POSTCODE_LIST
  • Create a lookup pipe from the new stream SOURCE_POSTCODE_LIST to Full Addresses
  • Call this lookup pipe: pc
  • In the matching Order/Index attributes form for the pipe create matches:

    Left-hand (post code reference data - SOURCE_POSTCODE_LIST)

    Right-hand (output - Full Addresses)

    HOUSENAMEORNUMBER

    in1_

    HOUSENAMEORNUMBER

    STREETNAME

    in1_

    STREETNAME

    TOWN

    in1_

    TOWN

    COUNTY

    in1_

    COUNTY


  • Drag the attribute POSTCODE from SOURCE_POSTCODE_LIST to Full Addresses
  • Run analysis on Full Addresses and view the results