On this page

    DROP BRANCH preview

    Remove a branch from an Arctic Catalog.

    DROP BRANCH [ IF EXISTS ] <branch_name>
      { AT COMMIT <commit_hash> | FORCE }
      [ IN <catalog_name> ]


    [ IF EXISTS ]


    When included, the command will succeed regardless of whether the branch existed. If this clause is not specified, the command will fail if the branch to be dropped does not exist.



    The name of the branch that you are dropping.

    AT COMMIT <commit_hash> | FORCE


    Use the AT COMMIT parameter when you want to specify the exact commit hash that the branch is expected to be at. This is helpful to prevent the branch from being dropped if it was modified unexpectedly. Commit hashes must be enclosed in double quotes (for example, “ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”). Use the FORCE parameter when you want to drop the branch even if it has been changed.

    IN <catalog_name>



    The name of the Arctic catalog containing the branch that you want to drop. If not specified, the current Arctic catalog in the query context is used.


    Drop a branch at the specified commit
    DROP BRANCH myBranch
      AT COMMIT "ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2"
    Use the FORCE parameter to drop the specified branch
    DROP BRANCH myBranch