On this page

    MERGE BRANCH preview

    Merge a (source) branch into the current branch that you are in by default, or into a target branch that you specify.

    Syntax
    MERGE BRANCH <source_branch_name>
      [ INTO <target_branch_name> ]
      [ IN <catalog_name> ]
    

    Parameters

    <source_branch_name>

    String

    The name of the branch that you want to merge into your target branch. If a target branch is not specified, the source branch is merged into the current branch you are in.


    INTO <target_branch_name>

    String

    Optional

    The name of the branch that is the target for the merge. If you do not use this optional clause and the reference is a branch, the query will still run successfully. However, if the reference is not a branch, the query will fail because you can merge only branches.


    IN <catalog_name>

    String

    Optional

    The name of the Arctic catalog. If not specified, the current Arctic catalog in the query context is used.

    Examples

    Merge a branch you specify into the current reference branch
    MERGE BRANCH myBranch
    
    Merge a branch you specify into another branch in the specified catalog
    MERGE BRANCH myBranch
      INTO main
      IN myCatalog