SHOW

Shows this information depending on the options selected:

  • Software version.

  • Current session node.

  • Tracing session details captured in the past 24 hours.

Synopsis

SHOW VERSION | HOST | SESSION <tracing_session_id>
Syntax legend
Legend
Syntax conventions Description

UPPERCASE

Literal keyword.

Lowercase

Not literal.

< >

Variable value. Replace with a user-defined value.

[]

Optional. Square brackets ([]) surround optional command arguments. Do not type the square brackets.

( )

Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.

|

Or. A vertical bar (|) separates alternative elements. Type any one of the elements. Do not type the vertical bar.

...

Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.

'<Literal string>'

Single quotation (') marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.

{ <key> : <value> }

Map collection. Braces ({ }) enclose map collections or key value pairs. A colon separates the key and the value.

<datatype2

Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.

<cql_statement>;

End CQL statement. A semicolon (;) terminates all CQL statements.

[--]

Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.

' <<schema\> ... </schema\>> '

Search CQL only: Single quotation marks (') surround an entire XML schema declaration.

@<xml_entity>='<xml_entity_type>'

Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files.

VERSION

Show the version for cqlsh, the database, the CQL specification, and native protocol.

HOST

Show the node details for the cqlsh session host.

SESSION <tracing_session_id>

Show the activity details for a specific query provided in <tracing_session_id>. Session IDs are shown in the query results and are recorded to the system_traces.sessions table.

All queries run from a TRACING enabled cqlsh session are captured in the session and events table and saved for 24 hours. After that time, the tracing information time-to-live expires.

Examples

Show the version:

SHOW VERSION

Example output, which varies depending on your implementation:

[cqlsh 6.8.0 | DSE 6.8.0 | CQL spec 3.4.5 | DSE protocol v2]

Show the host information for the cqlsh session host:

SHOW HOST

Returns the host name, IP address, and port of the CQL shell session. For example:

Connected to Test Cluster at 127.0.0.1:9042.

Show the request activity details for a specific session:

SHOW SESSION d0321c90-508e-11e3-8c7b-73ded3cb6170

Use a session ID from the query results or from the system_traces.sessions table.

Sample output from SHOW SESSION:

Tracing session: d0321c90-508e-11e3-8c7b-73ded3cb6170

 activity                                                                                                                                | timestamp    | source    | source_elapsed
-----------------------------------------------------------------------------------------------------------------------------------------+--------------+-----------+----------------
                                                                                                                      execute_cql3_query | 12:19:52,372 | 127.0.0.1 |              0
 Parsing CREATE TABLE emp (\n  empID int,\n  deptID int,\n  first_name varchar,\n  last_name varchar,\n  PRIMARY KEY (empID, deptID)\n); | 12:19:52,372 | 127.0.0.1 |            153
                                                                                                                        Request complete | 12:19:52,372 | 127.0.0.1 |            650
 . . .

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com