Skip to main content Skip to complementary content

Merging and deleting an Iceberg branch

The third step of this scenario is to merge the branch in the Iceberg table, and then, once merged, to delete the branch.

About this task

For this task the Merge branch and Drop branch subJobs are used.

Procedure

  1. From the Basic settings view of tIcebergMerge in Merge branch subJob, configure the parameters as follows:
    tIcebergMerge Basic settings view.
    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 the table from the branch default.marketing_toclean.branch_cleaned_data.
    4. In the Source alias parameter, enter an alias to be used for the source table. In this example it is cleaned.
    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 marketing_toclean.
    6. In the Target alias parameter, enter an alias to be used for the target table. In this example, it is toclean.
    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 cleaned.customer_id=toclean.customer_id which enables you to merge the customer_id data from the cleaned_data branch into the marketing_toclean table.
    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. Execute the Merge branch subJob by clicking the Run button from the Run tab.
    The data from the cleaned_data branch is merged into the marketing_toclean table.
  3. From the Basic settings view of tIcebergTable in Drop branch subJob, configure the parameters as follows:
    tIcebergTable Basic settings view.
    1. From the Property Type drop-down list, select where you store the data. In this example, it is Built-In.
    2. From the Connection drop-down list, select the connection component to be used. In this example it is tIcebergConnection_1.
    3. In the Table name field, enter the name of the table from which you want to delete a branch. In this example it is marketing_toclean.
    4. From the Action on table drop-down list, select Alter, and then from the Alter table action drop-down list, select Drop branch to delete a branch.
    5. In the Branch field, enter the name of the branch to be deleted. In this example, it is cleaned_data.
  4. Execute the Drop branch subJob by clicking the Run button from the Run tab.
    The cleaned_data Iceberg branch is deleted.

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!