Skip to main content

USE

The USE command enables you to specify the context to be used for the current query session.

Syntax
USE { <path> | REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name>
[ IN <catalog_name> ]

Parameters

<path> String

The path that you want to use.


USE { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> String

You can also use these Arctic references to inform the session:

  • REF: Changes the reference to the specified branch, tag, or commit.
  • BRANCH: Changes the reference to the specified branch.
  • TAG: Changes the reference to the specified tag.
  • COMMIT: Changes the reference to the specified commit. Commit hashes must be enclosed in double quotes (for example, “ff2fe50fef5a030c4fc8e61b252bdc33c72e2b6f929d813833d998b8368302e2”).

IN <catalog_name> String   Optional

The name of the Arctic catalog where you want to change the reference. When this parameter is not used, the current Arctic catalog in the query context is used.

Examples

Each query run after this command in the same session will assume the specified path as the context
USE Samples."samples.dremio.com";
Use the specified branch as the reference for the current query session
USE BRANCH myBranch
IN myCatalog;