USE WORKSPACE
On this page
The USE WORKSPACE command changes the current cluster and database in the notebook.
Syntax
USE WORKSPACE { ID '<cluster_ID>' | '<cluster_name>' | @@CURRENT }
[ IN GROUP { ID '<group_id>' | '<group_name>' } ]
[ WITH DATABASE 'database_name' ]Arguments
-
cluster_,ID cluster_: ID or name of the cluster to use.name -
group_,id group_: ID or name of the cluster group that contains the cluster.name -
database_: Name of the SingleStore database to connect with.name
Remarks
-
The
WITH DATABASEclause specifies the default database for the current session. -
Specify
@@CURRENTto connect to a database in the current cluster.For example: USE WORKSPACE @@CURRENT WITH DATABASE dbTest; -
SingleStore recommends using this command only in interactive notebooks.
It may not function as intended in scheduled notebooks.
Example
The following command sets the current cluster and database to examples and dbTest, respectively.
USE WORKSPACE 'examples' WITH DATABASE 'dbTest';
Last modified: