How to: Set Up the Merge Operator's Inner Feature

Prev Next

The Merge operator offers various options for merging data. The operator also lets you control how data merges through its two input ports. This guide explores merging data with the operator's Inner feature. Like the Intersection feature, the Inner feature merges all data with matching keys. The difference is that the values in one table add up to the values in the other table. In particular, the operator's lower input values add to the upper input table during the merge.

Configuration

Let's say you have a data table that includes insurance policyholders' names and their birthdates. Then, you have a second data table storing the policyholders' names and their premiums. These two tables include similar and different names. You want to merge all premiums to their respective policyholders and add them to the first table. To do this merge, you'll set up the operator's key as the policyholder name. After the merge, all values from the first table display in your new table with the premiums from the second table that correspond to their respective policyholders.

These instructions assume you have a new module open, saved, and with a title.

Configure the First Data Table Component

First, set up a Data Table component with a list of annuitants and their dates of birth.

  1. In the Module Builder, drag and drop a Data Table component onto your canvas.

  2. In the Property ID and Label Text fields, enter dtAnnuitant.

  3. In the data table, enter the following:

    annuitant

    dob

    Kris Marrier

    01/01/1990

    Mattie Poquette

    12/12/1989

    Ezekiel Chui

    04/05/1980

  4. Click Save Component.

Configure the Second Data Table Component

Next, set up a Data Table component with another list of annuitants and their insurance policy premiums. You can see that two of the names are the same, and the other is different from the last Data Table component.

  1. Drag and drop a Data Table component onto your canvas, placing it below the first one.

  2. In the Property ID and Label Text fields, enter dtPremiums.

  3. In the data table, enter the following:

    annuitant

    premium

    Kris Marrier

    50000

    Mattie Poquette

    25000

    Willow Kusko

    20000

  4. Click Save Component.

Configure the Data Workflow Component

Next, set up the Data Workflow component and configure the Merge operator. How you connect the operator's inputs becomes important when using the Inner feature. Every value in the upper input port displays in a new table. Only values from the lower input that match the upper input port's key display in the same table. For this how-to guide, input the dtAnnuitant Data Table component into the upper input port. Then, input the dtPremiums Data Table component into the lower input port. Lastly, set the Merge Key as annuitant. This setting combines all data by matching annuitants from both Data Table components.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below your Data Table components.

  2. In the Property ID and Canvas Label Text fields, enter dwfMergeInner.

Configure the First Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    dtAnnuitant

    Required

    Yes

    Source

    Default

Configure the Second Input Operator

  1. Drag and drop another Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    dtPremiums

    Required

    Yes

    Source

    Default

Configure the Merge Operator

  1. Drag and drop a Merge operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Merge

    Label

    Inner Merge

    Merge Type

    Inner

    Keep Flag

    False

    Renaming

    Replace

    Rows to Keep

    First

    Merge Key

    annuitant

  3. Connect the output port (right) of the dtAnnuitant Input operator to the upper input port (left) of the Inner Merge Merge operator.

  4. Connect the output port (right) of the dtPremiums Input operator to the lower input port (left) of the Inner Merge Merge operator.

Configure the Console Operator

Next, add a Console operator so you can view the results in the DevTools Console.

  1. Drag and drop a Console operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Console

    Label

    Inner Merge Result

  3. Connect the output port (right) of the Inner Merge Merge operator to the input port (left) of the Inner Merge Result Console operator.

  4. Click Save Component.

Configure the Button Component

Lastly, add a Button component to trigger the Data Workflow.

  1. Drag and drop a Button component onto your canvas, placing it below your Data Workflow component.

  2. In the Property ID field, enter btnMergeInner.

  3. In the Label Text field, enter Inner Merge.

  4. From the Action Type drop-down, select Event.

  5. From the On Click drop-down, select dwfMergeInner.

  6. Click Save Component.

  7. Save your module.

Here's how your completed module looks in the Module Builder:

Preview your module in Express View and open the DevTools Console. Click the Inner Merge button, and you’ll see the names and birthdates of Kris Marrier, Mattie Poquette, and Ezekiel Chui. These are all values from the Merge operator's upper input. Then, you see Marrier and Poquette's premiums, but not Chui's. Meaning, the Inner feature only adds values with the same keys as the other table. Ezekial Chui and their premium do not exist in the Merge operator's lower input.

For further testing, switch the inputs of your Merge operator and trigger the operation. You'll see very different values in your new table.

The Merge operator offers various options for merging data. The operator also lets you control how data merges through its two input ports. This guide explores merging data with the operator's Inner feature. Like the Intersection feature, the Inner feature merges all data with matching keys. The difference is that the values in one table add up to the values in the other table. In particular, the operator's lower input values add to the upper input table during the merge.

Configuration

Let's say you have a data table that includes insurance policyholders' names and their birthdates. Then, you have a second data table storing the policyholders' names and their premiums. These two tables include similar and different names. You want to merge all premiums to their respective policyholders and add them to the first table. To do this merge, you'll set up the operator's key as the policyholder name. After the merge, all values from the first table display in your new table with the premiums from the second table that correspond to their respective policyholders.

These instructions assume you have a new module open, saved, and with a title.

Configure the First Data Table Component

First, set up a Data Table component with a list of annuitants and their dates of birth.

  1. In the Module Builder, drag and drop a Data Table component onto your canvas.

  2. In the Property ID and Canvas Label Text fields, enter dtAnnuitant.

  3. In the data table, enter the following:

    annuitant

    dob

    Kris Marrier

    01/01/1990

    Mattie Poquette

    12/12/1989

    Ezekiel Chui

    04/05/1980

  4. Click Save & Close.

Configure the Second Data Table Component

Next, set up a Data Table component with another list of annuitants and their insurance policy premiums. You can see that two of the names are the same, and the other is different from the last Data Table component.

  1. Drag and drop a Data Table component onto your canvas, placing it below the first one.

  2. In the Property ID and Canvas Label Text fields, enter dtPremiums.

  3. In the data table, enter the following:

    annuitant

    premium

    Kris Marrier

    50000

    Mattie Poquette

    25000

    Willow Kusko

    20000

  4. Click Save & Close.

Configure the Data Workflow Component

Next, set up the Data Workflow component and configure the Merge operator. How you connect the operator's inputs becomes important when using the Inner feature. Every value in the upper input port displays in a new table. Only values from the lower input that match the upper input port's key display in the same table. For this how-to guide, input the dtAnnuitant Data Table component into the upper input port. Then, input the dtPremiums Data Table component into the lower input port. Lastly, set the Merge Key as annuitant. This setting combines all data by matching annuitants from both Data Table components.

  1. Drag and drop a Data Workflow component onto your canvas, placing it below your Data Table components.

  2. In the Canvas Label Text and Property Name fields, enter dwfMergeInner.

Configure the First Input Operator

  1. Drag and drop an Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    dtAnnuitant

    Required

    Yes

    Source

    Default

Configure the Second Input Operator

  1. Drag and drop another Input operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Input

    Component

    dtPremiums

    Required

    Yes

    Source

    Default

Configure the Merge Operator

  1. Drag and drop a Merge operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Merge

    Label

    Inner Merge

    Merge Type

    Inner

    Keep Flag

    False

    Renaming

    Replace

    Rows to Keep

    First

    Merge Key

    annuitant

  3. Connect the output port (right) of the dtAnnuitant Input operator to the upper input port (left) of the Inner Merge Merge operator.

  4. Connect the output port (right) of the dtPremiums Input operator to the lower input port (left) of the Inner Merge Merge operator.

Configure the Console Operator

Next, add a Console operator so you can view the results in the DevTools Console.

  1. Drag and drop a Console operator onto your Data Workflow canvas.

  2. Configure the operator's Info window as follows:

    Setting

    Value

    Category

    Console

    Label

    Inner Merge Result

  3. Connect the output port (right) of the Inner Merge Merge operator to the input port (left) of the Inner Merge Result Console operator.

  4. Click Save.

Configure the Button Component

Lastly, add a Button component to trigger the Data Workflow.

  1. Drag and drop a Button component onto your canvas, placing it below your Data Workflow component.

  2. In the Property ID field, enter btnMergeInner.

  3. In the Label Text field, enter Inner Merge.

  4. Set the Action Type as Event.

  5. From the On Click drop-down, select dwfMergeInner.

  6. Click Save & Close.

  7. Save your module.

Here's how your cmpleted module looks in the Module Builder:

Preview your module in Express View and open the DevTools Console. Click the Inner Merge button, and you’ll see the names and birthdates of Kris Marrier, Mattie Poquette, and Ezekiel Chui. These are all values from the Merge operator's upper input. Then, you see Marrier and Poquette's premiums, but not Chui's. Meaning, the Inner feature only adds values with the same keys as the other table. Ezekial Chui and their premium do not exist in the Merge operator's lower input.

For further testing, switch the inputs of your Merge operator and trigger the operation. You'll see very different values in your new table.