CREATE TAG
Create a tag for a reference.
SyntaxCREATE TAG [ IF NOT EXISTS ] <tag_name>
[ { FROM | AT } { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> ]
[ IN <catalog_name> ]
Parameters
[ IF NOT EXISTS ] Optional
If you include this optional clause, the command will run regardless of whether the tag exists and you will receive a summary indicating whether the tag could be created. If this clause is not specified, the command will fail if the tag to be created already exists.
<tag_name> String
The name of the tag that you are creating. The name cannot include the following special characters: /
, :
, [
, or ]
. If an Arctic catalog is not specified, the tag is created in the catalog specified in the query context.
{ FROM | AT } { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> String Optional
Specifies the reference from which or at which you want the new tag to be created. When this parameter is omitted, the current reference is used.
-
REF
: Identifies a specific branch, tag, or commit. -
BRANCH
: Identifies a specific branch. -
TAG
: Identifies a specific tag. -
COMMIT
: Identifies a specific commit. Commit hashes must be enclosed in double quotes (for example,“ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”
.
IN <catalog_name> String Optional
The name of the Arctic catalog that you want to create a tag in. If not specified, the current Arctic catalog in the query context is used.
Examples
Create a tagCREATE TAG myTag
CREATE TAG commitTag
AT COMMIT "c7a79c74adf76649e643354c34ed69abfee5a3b070ef68cbe782a072b0a418ba"
CREATE TAG myTag
AT BRANCH myBranch
IN myCatalog