USE
Specify or clear the context for the query session.
note
In the SQL Runner, the USE command only works with multi-statement SQL commands and scripts. USE also does not apply to table references in saved views.
USE [ { <path> | { REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> }
[ IN <catalog_name> ] ]
Parameters
<path> String Optional
The path that you want to use. By not specifying any parameters, you can clear the context for the query session.
{ REF[ERENCE] | BRANCH | TAG | COMMIT } <reference_name> String Optional
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
Clear the context for the query sessionUSE;
USE Samples."samples.dremio.com";
USE BRANCH myBranch
IN myCatalog;