Skip to main content Skip to complementary content

Merging Iceberg tables

The final step of this scenario is to merge the data from the marketing_iceberg Iceberg table into the customers_iceberg Iceberg table.

About this task

For this task, the Merging subJob is used.

Procedure

  1. From the Basic settings view of tIcebergMerge called merge, configure the parameters as follows:
    tIcebergMerge component properties.
    1. From the Connection drop-down list, select the connection component to be used. In this example it is tIcebergConnection_1.
    2. From the Source type drop-down list, select how you want to get data to perform the merge action. In this example it is Table.
    3. In the Source table name parameter, enter the name of the Iceberg table from which you want to get data. In this example it is marketing_iceberg.
    4. In the Source alias parameter, enter an alias to be used for the source table. In this example it is M.
    5. In the Target table name parameter, enter the name of the Iceberg table in which you want to perform the merge. In this example it is customers_iceberg.
    6. In the Target alias parameter, enter an alias to be used for the target table. In this example, it is T.
    7. In the Merge on parameter, enter the Boolean expression to be used to join the source and target tables. In this example it is M.customer_id=C.customer_id which enables you to merge the customer_id data from marketing_iceberg into customers_iceberg.
    8. Select the When matched update checkbox to perform the WHEN MATCHED THEN UPDATE SET statement, and enter the Boolean expression for the clause in the Set clauses list. In this example, it is membership_type=M.memberhsip_type which enables you to perform the merge on the membership_type data.
    9. Leave the other parameters as is.
  2. From the Basic settings view of the two tIcebergInput called count gold members, configure the parameters as follows:
    tIcebergInput component properties.
    1. In the Sql query field, enter the SQL query to perform. In this example it is "SELECT count (*) as total from marketing_iceberg where membership_type='Gold'" which enables you to count all the members that have the gold membership.
    2. From the Connection drop-down list, select the connection component to be used. In this example it is tIcebergConnection_1.
  3. From the Basic settings view of the two tLogRow called before merge and after merge, configure the parameters as follows:
    1. Select the Table (print values in cells of table) option from the Mode section.
    2. Leave the other parameters as is.

Results

The results appear in the Execution console of your Job. You can see that the result before the merge is 117, and the result after the merge is 158 which match the previous results from the Updating subJob.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!