Important

Helios features are now enabled during weekly update windows and are no longer directly tied to SingleStore engine releases. Refer to the release notes to view the latest features available in your Helios cluster.

USE WORKSPACE

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_name: ID or name of the cluster to use.

  • group_id, group_name: ID or name of the cluster group that contains the cluster.

  • database_name: Name of the SingleStore database to connect with.

Remarks

  • The WITH DATABASE clause specifies the default database for the current session.

  • Specify @@CURRENT to 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:

Was this article helpful?