Defining run behavior with execution configurations
With results visualization and profiling capability, Studio is a powerful debugging tool that executes code in a way that reproduces the settings used in their applications. When using Studio to interact with DSE, you are able to execute code written in CQL, Gremlin, or Spark SQL. Each cell language has its own set of configuration options that determine execution behavior.
Execution configurations provide different execution setups by passing a set of options that customize the run execution. Execution configurations are persistent so you can reuse them.
To execute only the highlighted statement, select the statement in the cell and click the Run () button. |
The default execution configuration is LOCAL.ONE.
When connecting to Astra, the default consistency is LOCAL_QUORUM
.
Standard run configurations are provided:
Cell type | Execution configuration | Settings |
---|---|---|
CQL |
LOCAL.ONE |
|
CQL |
LOCAL.QUORUM |
|
CQL |
LOCAL.QUORUM.TRACE |
|
Gremlin |
Transactional |
Execute statement using real-time (transactional) engine for OLTP (online transaction processing), traversal source |
Gremlin |
Analytic |
Execute statement using analytic engine (Spark) for OLAP (online analytical processing), traversal source |
Spark SQL |
Run |
Execute statement with Spark SQL query engine with AlwaysOn SQL service. |
You can create a custom CQL execution configuration by adjusting these settings for your environment:
-
Consistency level: ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE
-
Timeout (MS): milliseconds
-
Max Results: number of records
-
CQL Tracing: Enabled or Disabled
Procedure
-
In the upper-right corner of a code cell, hover over the play button ▶ and then click ▾ to list the existing configurations.
-
In CQL cells, the default execution configuration is CL.ONE so the play button is CL.ONE ▶.
-
In Gremlin cells, the default execution configuration is Execute using real-time (transactional) engine so the play button is Real-time ▶.
-
In Spark SQL cells, all statements are executed with Spark SQL query engine with AlwaysOn SQL service.
-
-
Select Manage Configurations.
-
Select an existing configuration to view settings.
-
For CQL cells only: Click
+
Add New Configuration to create an execution configuration.-
Enter a self-describing Name.
-
Select a Consistency Level.
-
Enter a Timeout value in milliseconds.
-
Enter Max Results.
-
Select the CQL Tracing check box to enable CQL tracing.
-
-
Click Save.
New execution configurations are available to be selected from any CQL notebook cell.