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
From the Basic settings view of tIcebergMerge in
Merge branch subJob, configure the parameters as
follows:
From the Connection drop-down list, select the
connection component to be used. In this example it is
tIcebergConnection_1.
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.
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.
In the Source alias parameter, enter an alias to
be used for the source table. In this example it is
cleaned.
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.
In the Target alias parameter, enter an alias to
be used for the target table. In this example, it is
toclean.
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.
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.
Leave the other parameters as is.
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.
From the Basic settings view of tIcebergTable in
Drop branch subJob, configure the parameters as
follows:
From the Property Type drop-down list, select
where you store the data. In this example, it is
Built-In.
From the Connection drop-down list, select the
connection component to be used. In this example it is
tIcebergConnection_1.
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.
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.
In the Branch field, enter the name of the branch
to be deleted. In this example, it is
cleaned_data.
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!