Cassandra
Query Apache Cassandra and ScyllaDB with CQL: queries with bound values and paging, find, count, row inserts in batches, keyspaces and tables. Typical uses: read time-stamped data from Cassandra, load rows into a Cassandra table.
cassandra pingcassandra querycassandra querycassandra findcassandra findcassandra countcassandra countcassandra insertcassandra insertcassandra batchcassandra batchcassandra databasescassandra collectionscassandra collectionscassandra collection_createcassandra collection_infocassandra collection_drop
cassandra ping <config>
Description
Test the connection and the authentication. Returns {ok, release_version, cluster_name, data_center, cql_version, protocol}
Test the connection and the authentication. Returns {ok, release_version, cluster_name, data_center, cql_version, protocol}
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
admin
cassandra ping "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}"
mentdb
{"ok": true, "release_version": "5.0.9", "cluster_name": "Test Cluster", "data_center": "datacenter1", "cql_version": ["3.4.7"], "protocol": 4}
cassandra query <config> <cql>
Description
Run a CQL statement: rows for a SELECT, else a description of the result
Run a CQL statement: rows for a SELECT, else a description of the result
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
cql: The CQL statement; ? or :name for the bound variables - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
cql: The CQL statement; ? or :name for the bound variables - String - required
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "CREATE KEYSPACE IF NOT EXISTS shop WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}"
mentdb
{"change": "CREATED", "target": "KEYSPACE", "keyspace": "shop"}
create a table (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "CREATE TABLE IF NOT EXISTS shop.sales (shop text, day date, id timeuuid, amount decimal, qty int, tags set<text>, PRIMARY KEY ((shop), day, id))"
mentdb
{"change": "CREATED", "target": "TABLE", "keyspace": "shop", "name": "sales"}
insert a row (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "INSERT INTO shop.sales (shop, day, id, amount, qty, tags) VALUES ('Paris', '2026-11-17', now(), 12.50, 3, {'promo'})"
mentdb
{"done": true}
read the rows (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "SELECT shop, day, amount, qty, tags FROM shop.sales"
mentdb
[{"shop": "Paris", "day": "2026-11-17", "amount": 12.50, "qty": 3, "tags": ["promo"]}]
an error of the server (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "SELECT * FROM shop.nope"
mentdb
ERROR: Sorry, an error appears (cassandra error (Invalid query): table nope does not exist).
cassandra query <config> <cql> <json_params>
Description
Run with parameters: values (a JSON array for ?, in order, or a JSON object for :name: the statement is prepared; an object is refused when two variables have the same name, like two ? on one column), consistency, serial_consistency (SERIAL or LOCAL_SERIAL), page_size (5000, 100000 at most), limit (10000, 1000000 at most: the rows beyond are not read)
Run with parameters: values (a JSON array for ?, in order, or a JSON object for :name: the statement is prepared; an object is refused when two variables have the same name, like two ? on one column), consistency, serial_consistency (SERIAL or LOCAL_SERIAL), page_size (5000, 100000 at most), limit (10000, 1000000 at most: the rows beyond are not read)
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
cql: The CQL statement; ? or :name for the bound variables - String - required
json_params: The parameters - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
cql: The CQL statement; ? or :name for the bound variables - String - required
json_params: The parameters - String - required
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "INSERT INTO shop.sales (shop, day, id, amount, qty, tags) VALUES (?, ?, now(), ?, ?, ?)" "{\"values\": [\"Lyon\", \"2026-11-16\", \"19.99\", 2, [\"web\", \"promo\"]]}"
mentdb
{"done": true}
named values (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "SELECT shop, day, amount, qty FROM shop.sales WHERE shop = :shop" "{\"values\": {\"shop\": \"Lyon\"}}"
mentdb
[{"shop": "Lyon", "day": "2026-11-16", "amount": 19.99, "qty": 2}]
the first row only, pages of 1 row (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "SELECT shop, qty FROM shop.sales" "{\"page_size\": 1, \"limit\": 1}"
mentdb
[{"shop": "Paris", "qty": 3}]
a default keyspace in the configuration, another consistency (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra query "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\", \"keyspace\": \"shop\", \"consistency\": \"LOCAL_QUORUM\"}" "SELECT count(*) AS n FROM sales" "{\"consistency\": \"ONE\"}"
mentdb
[{"n": 2}]
cassandra find <config> <table> <json_filter>
Description
The rows of a table matching a filter (equality per column, IN for an array): SELECT * ... WHERE ... LIMIT. The filter must follow the primary key, unless allow_filtering
The rows of a table matching a filter (equality per column, IN for an array): SELECT * ... WHERE ... LIMIT. The filter must follow the primary key, unless allow_filtering
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
admin
cassandra find "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "{\"shop\": \"Lyon\"}"
mentdb
[{"shop": "Lyon", "day": "2026-11-16", "id": "4044aa60-e27c-11f1-8ef9-c5891bf02a8a", "amount": 19.99, "qty": 2, "tags": ["promo", "web"]}]
several partitions (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra find "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "{\"shop\": [\"Paris\", \"Lyon\"]}"
mentdb
[{"shop": "Lyon", "day": "2026-11-16", "id": "4044aa60-e27c-11f1-8ef9-c5891bf02a8a", "amount": 19.99, "qty": 2, "tags": ["promo", "web"]}, {"shop": "Paris", "day": "2026-11-17", "id": "4027d390-e27c-11f1-8ef9-c5891bf02a8a", "amount": 12.50, "qty": 3, "tags": ["promo"]}]
cassandra find <config> <table> <json_filter> <json_options>
Description
Find with options: fields (the columns), limit (10000), allow_filtering (false), consistency
Find with options: fields (the columns), limit (10000), allow_filtering (false), consistency
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
json_options: The options - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
json_options: The options - String - required
admin
cassandra find "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\", \"keyspace\": \"shop\", \"consistency\": \"LOCAL_QUORUM\"}" "sales" "{\"qty\": 2}" "{\"fields\": [\"shop\", \"amount\"], \"allow_filtering\": true}"
mentdb
[{"shop": "Lyon", "amount": 19.99}]
cassandra count <config> <table>
Description
The number of rows of a table (SELECT count(*): a full scan on a large table)
The number of rows of a table (SELECT count(*): a full scan on a large table)
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
admin
cassandra count "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales"
mentdb
2
cassandra count <config> <table> <json_filter>
Description
The number of rows matching a filter (equality per column, IN for an array)
The number of rows matching a filter (equality per column, IN for an array)
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_filter: The filter as a JSON object: equality per attribute, an array means IN ({} for none) - String - required
admin
cassandra count "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "{\"shop\": \"Lyon\"}"
mentdb
1
cassandra insert <config> <table> <json_rows>
Description
Insert rows (a JSON array of objects: the keys are the columns) with prepared INSERT statements, sent in unlogged batches of 20. A missing key is not written (no tombstone); null writes a null. Returns {inserted, batches, errors}
Insert rows (a JSON array of objects: the keys are the columns) with prepared INSERT statements, sent in unlogged batches of 20. A missing key is not written (no tombstone); null writes a null. Returns {inserted, batches, errors}
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_rows: The rows - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_rows: The rows - String - required
admin
cassandra insert "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "[{\"shop\": \"Nice\", \"day\": \"2026-11-15\", \"id\": \"50554d6e-29bb-11e5-b345-feff819cdc9f\", \"amount\": 5, \"qty\": 1}, {\"shop\": \"Nice\", \"day\": \"2026-11-16\", \"id\": \"60554d6e-29bb-11e5-b345-feff819cdc9f\", \"amount\": 7.5, \"qty\": 2}, {\"shop\": \"Lille\", \"day\": \"2026-11-16\", \"id\": \"70554d6e-29bb-11e5-b345-feff819cdc9f\", \"amount\": 3, \"qty\": 1, \"tags\": [\"new\"]}]"
mentdb
{"inserted": 3, "batches": 1, "errors": []}
cassandra insert <config> <table> <json_rows> <json_params>
Description
Insert with parameters: batch_size (20, 1000 at most; Cassandra refuses batches larger than 50 KB by default), logged (false), ttl (seconds), if_not_exists (false; true: one lightweight transaction per row, the result gives {inserted, skipped, errors}), consistency
Insert with parameters: batch_size (20, 1000 at most; Cassandra refuses batches larger than 50 KB by default), logged (false), ttl (seconds), if_not_exists (false; true: one lightweight transaction per row, the result gives {inserted, skipped, errors}), consistency
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_rows: The rows - String - required
json_params: The parameters - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table - String - required
json_rows: The rows - String - required
json_params: The parameters - String - required
admin
cassandra insert "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "[{\"shop\": \"Nice\", \"day\": \"2026-11-15\", \"id\": \"50554d6e-29bb-11e5-b345-feff819cdc9f\", \"amount\": 99}, {\"shop\": \"Nice\", \"day\": \"2026-11-14\", \"id\": \"80554d6e-29bb-11e5-b345-feff819cdc9f\", \"amount\": 4}]" "{\"if_not_exists\": true}"
mentdb
{"inserted": 1, "skipped": 1, "errors": []}
rows that expire after one day (fixed result: real Apache Cassandra 5.0.9)
admin
cassandra insert "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales" "[{\"shop\": \"Tmp\", \"day\": \"2026-11-17\", \"id\": \"90554d6e-29bb-11e5-b345-feff819cdc9f\", \"qty\": 1}]" "{\"ttl\": 86400, \"batch_size\": 100}"
mentdb
{"inserted": 1, "batches": 1, "errors": []}
cassandra batch <config> <json_statements>
Description
Run several statements in one BATCH (logged by default): each statement is a CQL text, or {"cql": ..., "values": [...] or {...}} (prepared). Returns {statements}, or the rows of a conditional batch
Run several statements in one BATCH (logged by default): each statement is a CQL text, or {"cql": ..., "values": [...] or {...}} (prepared). Returns {statements}, or the rows of a conditional batch
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
json_statements: The statements as a JSON array - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
json_statements: The statements as a JSON array - String - required
admin
cassandra batch "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "[\"INSERT INTO shop.sales (shop, day, id, qty) VALUES ('Tmp', '2026-11-18', now(), 2)\", {\"cql\": \"DELETE FROM shop.sales WHERE shop = ? AND day = ?\", \"values\": [\"Lille\", \"2026-11-16\"]}]"
mentdb
{"statements": 2}
cassandra batch <config> <json_statements> <json_params>
Description
A batch with parameters: type (logged, unlogged or counter), consistency, serial_consistency
A batch with parameters: type (logged, unlogged or counter), consistency, serial_consistency
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
json_statements: The statements - String - required
json_params: The parameters - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
json_statements: The statements - String - required
json_params: The parameters - String - required
admin
cassandra batch "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "[{\"cql\": \"UPDATE shop.sales SET qty = :q WHERE shop = :s AND day = :d AND id = :i\", \"values\": {\"q\": 5, \"s\": \"Nice\", \"d\": \"2026-11-15\", \"i\": \"50554d6e-29bb-11e5-b345-feff819cdc9f\"}}]" "{\"type\": \"unlogged\"}"
mentdb
{"statements": 1}
cassandra databases <config>
Description
The names of the keyspaces
The names of the keyspaces
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
admin
cassandra databases "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}"
mentdb
["shop", "system", "system_auth", "system_distributed", "system_schema", "system_traces"]
cassandra collections <config>
Description
The names of the tables of the keyspace of the configuration
The names of the tables of the keyspace of the configuration
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
admin
cassandra collections "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\", \"keyspace\": \"shop\", \"consistency\": \"LOCAL_QUORUM\"}"
mentdb
["sales"]
cassandra collections <config> <keyspace>
Description
The names of the tables of a keyspace
The names of the tables of a keyspace
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
keyspace: The keyspace - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
keyspace: The keyspace - String - required
admin
cassandra collections "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop"
mentdb
["sales"]
cassandra collection_create <config> <table> <json_options>
Description
Create a table (IF NOT EXISTS by default). Returns {created}
Create a table (IF NOT EXISTS by default). Returns {created}
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_options: columns (names and CQL types), primary_key (a list of columns, or a CQL key like "(shop), day"; the names are quoted like the columns), if_not_exists (true), with (table options like default_time_to_live = 3600) - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
json_options: columns (names and CQL types), primary_key (a list of columns, or a CQL key like "(shop), day"; the names are quoted like the columns), if_not_exists (true), with (table options like default_time_to_live = 3600) - String - required
admin
cassandra collection_create "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\", \"keyspace\": \"shop\", \"consistency\": \"LOCAL_QUORUM\"}" "people" "{\"columns\": {\"id\": \"int\", \"name\": \"text\", \"city\": \"text\", \"tags\": \"set<text>\"}, \"primary_key\": [\"id\"], \"with\": \"default_time_to_live = 0\"}"
mentdb
{"created": "shop.people"}
cassandra collection_info <config> <table>
Description
A table: {keyspace, table, comment, default_time_to_live, gc_grace_seconds, columns} with the columns of the primary key first ({column_name, type, kind, position, clustering_order})
A table: {keyspace, table, comment, default_time_to_live, gc_grace_seconds, columns} with the columns of the primary key first ({column_name, type, kind, position, clustering_order})
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
admin
cassandra collection_info "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\"}" "shop.sales"
mentdb
{"keyspace": "shop", "table": "sales", "comment": "", "default_time_to_live": 0, "gc_grace_seconds": 864000, "columns": [{"column_name": "shop", "type": "text", "kind": "partition_key", "position": 0, "clustering_order": "none"}, {"column_name": "day", "type": "date", "kind": "clustering", "position": 0, "clustering_order": "asc"}, {"column_name": "id", "type": "timeuuid", "kind": "clustering", "position": 1, "clustering_order": "asc"}, {"column_name": "amount", "type": "decimal", "kind": "regular", "position": -1, "clustering_order": "none"}, {"column_name": "qty", "type": "int", "kind": "regular", "position": -1, "clustering_order": "none"}, {"column_name": "tags", "type": "set<text>", "kind": "regular", "position": -1, "clustering_order": "none"}]}
cassandra collection_drop <config> <table>
Description
Drop a table (IF EXISTS). Returns {dropped}
Drop a table (IF EXISTS). Returns {dropped}
Parameters
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
config: The Cassandra configuration as JSON: host (127.0.0.1), port (9042), username and password (or password: the name of a secret (secret set); PasswordAuthenticator), keyspace (the default keyspace: USE at the connection), consistency (LOCAL_ONE; ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, LOCAL_ONE), tls (false; true: certificate and host name checked with the trust store of the JDK), allow_plain (false: a password without tls is refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (10000) - String - required
table: The table, as table or keyspace.table - String - required
admin
cassandra collection_drop "{\"host\": \"127.0.0.1\", \"username\": \"cassandra\", \"password\": \"cassandra_password\", \"keyspace\": \"shop\", \"consistency\": \"LOCAL_QUORUM\"}" "people"
mentdb
{"dropped": "shop.people"}
