Search tips
About CQL
CQL (Cassandra Query Language) is a query language for the DataStax Enterprise database.
CQL quick reference
Provides a consolidated syntax list of Cassandra Query Language (CQL) commands for quick reference.
Basic rules to follow when designing a DataStax Enterprise database.
Data modeling concepts
Uses a Pro cycling example to demonstrate the query drive approach to data modeling.
Data modeling analysis
Analyze the design based on storage, capacity, redundancy, and consistency.
Using materialized views
Learn about materialized views, which are tables with data that is automatically inserted and updated from another base table.
Shows the CQL command syntax and rules, and provides instruction on using CQL shell (cqlsh).
Accessing data using CQL
Resources for running CQL commands, including steps to launch the cqlsh utility.
Understanding the CQL command syntax
Basic rules and limitations for writing CQL statements; including case, valid characters, escaping characters, keyspace qualifiers, commenting, keywords, and exponential notation.
About system keyspace tables
Provides details about database objects and cluster configuration in the system keyspace tables.
Create, alter, and drop keyspaces, tables, functions, and search indexes.
Create and drop keyspaces, and manage the replication factor (data availability).
Types, functions and aggregates
Create, replace, alter, and drop customized user-defined functions, aggregates, and types.
How to create tables to store data.
Search Indexes
Create and configure a search index on an existing table.
How to insert data into a table with either regular or JSON data.
Using INSERT and UPDATE to write values
Inserting set data with the INSERT command.
Using lightweight transactions
INSERT and UPDATE statements that use the IF clause support lightweight transactions, also known as Compare and Set (CAS).
Inserting JSON formatted values
Inserting JSON data with the INSERT command for testing queries.
Importing data from a CSV file
Inserting data with the cqlsh command COPY from a CSV file is common for testing queries.
Deleting values
Use the DELETE command to replace the value in a column with null or to remove an entire row of data.
Expiring data with time-to-live
Use time-to-live (TTL) to expire data in a column or table.
Batching inserts and updates
Performing multiple writes in the same command.
Retrieve data sets from a table using SELECT statements.
About SELECT statements
Retrieving data from tables.
Setting consistency levels
Set the consistency level to control the accuracy of the data returned by read request.
Restricting queries using WHERE clauses
Describes restrictions of partition and clustering columns in a WHERE clause.
Filtering using a search index
DataStax Enterprise supports production-grade implementation of CQL Solr queries in DSE Search.
Returning collections
How to retrieve data from a collection.
Aggregating results
Using the SELECT command to return data and apply standard aggregate functions.
Using user-defined functions (UDF)
Using the SELECT command to return data and applying a UDF.
Returning the write timestamp
Using the WRITETIME function in a SELECT statement to determine when the date/time that the column was written to the database.
Formatting query results as JSON
Use the SELECT command to return JSON data.
Commands specific to the Cassandra Query Language shell (cqlsh) utility.
cqlsh (startup options)
Describes the options available when starting the CQL shell.
Configuring a cqlshrc file
Customizes the CQL shell configuration at start up from a properties file.
Appends query results to a file.
Clears the CQL shell terminal window.
Determines how many nodes in the replica must respond for the coordinator node to successfully process a non-lightweight transaction during the CQL shell session.
Imports and exports CSV data.
Lists all user-defined aggregates or shows the definition of a specific aggregate.
Provides high-level details about the connected cluster or definitions of all objects in the cluster.
Provides information on user-defined functions.
Provides definition of specified index.
Provides a list of all keyspaces in the cluster or definition of all objects in a named keyspace.
Provides definition of the specified materialized view.
Provides the definition of specified search index in XML format.
Provides detailed, executable CQL information of a table.
Provides a list of all tables.
Lists user-defined types in the current keyspace or all user-defined types in the cluster when no keyspace is selected or provides details on the specified user-defined type.
Provides a testing mechanism when setting up proxy roles by running CQL commands as another role.
Formats query output vertically.
Terminates the CQL shell.
Switches user accounts without ending the CQL shell session.
Displays query results in 100-line chunks.
Sets consistency for lightweight transactions (LWT).
Displays the product instance version, the session CQL and cqlsh versions, current session node information, and tracing session details captured in the past 24 hours.
Executes a file containing CQL statements.
Enables or disables request tracing for all nodes in the cluster.
Provides a brief description and syntax for CQL statements, types, operators, and functions supported by the DataStax Enterprise database.
CQL overview.
CQL data types
Describes data types.
Search index field type classes
Definitions for DSE Search index schema field types.
CQL Operators
Describes the CQL operators.
CQL native functions
Describes scalar functions that work on values in a single row of data to create a new value.
CQL native aggregates
Works on a set of rows matching the SELECT statement to return a single value.
CQL commands
Describes Cassandra Query Language (CQL) statements supported by the DataStax Enterprise database.
CQL description of keyspaces, tables and other database resources used in CQL examples.
Setting up the Cycling keyspace
CQL commands to set up the cycling keyspace and examples used in this guide.
Search index examples
Step-by-step tutorials with sample keyspaces, tables, and data that demonstrate DSE Search index functionality.