DESCRIBE MATERIALIZED VIEW
Shows the definition of one materialized view as an executable CQL statement.
Synopsis
DESCRIBE MATERIALIZED VIEW [<keyspace_name>.]<view_name>
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
- DESCRIBE MATERIALIZED VIEW
-
Get one materialized view specified by name.
The short form is
DESC MATERIALIZED VIEW. - <keyspace_name>
-
Optional. Name of the keyspace containing the materialized view. If not specified, the current keyspace is used.
- <view_name>
-
Name of the materialized view to describe.
|
On Linux systems, object names, such as keyspace and table names, are case-sensitive. CQL converts object names to lowercase unless enclosed in double quotation marks. |
Examples
Get the definition of the cyclist_by_birthday materialized view in the cycling keyspace:
DESC MATERIALIZED VIEW cycling.cyclist_by_birthday;
If the materialized view exists, the result is the materialized view definition as an executable CQL statement. For example:
CREATE MATERIALIZED VIEW cycling.cyclist_by_birthday AS
SELECT birthday, cid, age, country, name
FROM cycling.cyclist_base
WHERE birthday IS NOT NULL AND cid IS NOT NULL
PRIMARY KEY (birthday, cid)
WITH CLUSTERING ORDER BY (cid ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy',
'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND speculative_retry = '99PERCENTILE';
You can use the output to re-create a materialized view in another environment if a valid base table exists.
The base table name is specified in the FROM clause of the materialized view definition.
To get the base table definition, use DESCRIBE TABLE.
The contents of the WITH clause depends on your materialized view and cluster configuration.
Unspecified options fallback to default values if not explicitly set in CREATE MATERIALIZED VIEW.