Create a connection in DataStax Studio
Each notebook requires a connection to a DSE cluster or Astra DB Serverless database. A notebook persists its data to the database cluster.
When editing a notebook, click the connection name (the default is default localhost
) in the header to change, edit, and add connections.
You can also manage connections when you create a new notebook, or through the DataStax Studio menu (☰).
Once you create a connection, you can use that connection for multiple notebooks, and you can switch connections as needed. The connection automatically populates if you have only one connection available.
Astra DB Serverless connections
To add an Astra DB Serverless connection, do the following:
-
In DataStax Studio, click the menu (☰), and then select Connections.
The existing connections are listed in alphabetical order with the port and host for each connection.
Alternatively, when editing a notebook, click the connection name in the header to manage connections.
-
Click Add New Connection.
-
Click the Astra Connection tab to connect to an Astra DB Serverless database.
-
Enter the connection details:
-
Name: Name of the connection from the notebook to an Astra DB Serverless database, such as
Astra Notebook Connection
-
Secure Connection Bundle path: The absolute path to a local copy of your database’s Secure Connect Bundle (SCB).
-
Client ID and Client Secret: Optional client ID and secret values from an Astra application token.
-
-
Click Test to verify the connection.
-
Click Save.
DSE connections
To connect DataStax Studio to a DSE cluster, the cluster must have DSE installed and the cluster must be running. Additionally, make sure you only connect notebooks to compatible clusters:
-
To run Gremlin cells, the connected cluster must have DataStax Graph (core) or DSE Graph (legacy) configured and running.
-
To run AlwaysOn SQL queries in Studio, the connected cluster must have the AlwaysOn SQL service configured and running.
To add a DSE cluster connection, do the following:
-
In DataStax Studio, click the menu (☰), and then select Connections.
The existing connections are listed in alphabetical order with the port and host for each connection.
Alternatively, when editing a notebook, click the connection name in the header to manage connections.
-
Click Add New Connection.
-
Click the Standard Connection tab.
-
Enter the connection details:
-
Name: Name of the connection, such as
DSE Notebook Connection
-
Host/IP (comma delimited): The host names or IP addresses of the DSE cluster to connect to, such as
127.0.0.1
. All hosts must be in a single datacenter. Default:localhost
.You can configure more than one host in a Studio connection. Hosts initialize the embedded Java driver connection, so more than one host provides redundancy and failover protection.
-
Username and Password: Optional DSE credentials for authentication if required by your cluster. For more information, see About DSE Unified Authentication.
-
Port: IP connection port, such as 9091. Default: 9042.
-
-
Optional: To configure an encrypted connection, select Use SSL, and then configure the Truststore and Keystore settings. For more information, see Use SSL connections in DataStax Studio.
-
Click Test to verify the connection.
-
Click Save.