Main Content

Database ToolboxInterface forApache CassandraDatabaseError Messages

This table describes how to address common errors you can encounter while working with theDatabase Toolbox™ Interface for Apache Cassandra®Database.

Error Message Probable Cause Resolution
Cassandra exception:error message

The Cassandra®Java®driver throws an error. Sometimes the error can result from an invalid Cassandra Query Language (CQL) query.

Use the error message to troubleshoot the issue. If you are using a CQL query, ensure that you enter a valid CQL query in thequeryinput argument of theexecutecqlfunction.

Invalid Cassandra connection.

The Cassandra database connection is closed.

Create a new Cassandra database connection using thecassandrafunction.

Unable to findkeyspacenamekeyspace. View the Keyspaces property to list the keyspaces in the cluster.

The specified keyspace does not exist in the Cassandra database.

Specify a keyspace that exists in the Cassandra database. To view the keyspaces, access theKeyspacesproperty of thecassandraobject.

Unable to findtablenametable. View the tablenames function to list the tables in the keyspace.

The specified Cassandra database table does not exist in the Cassandra database.

Specify a Cassandra database table that exists in the Cassandra database. To view the Cassandra database tables, use thetablenamesfunction.

Too many inputs. Tabletablenamehasnprimary keys, butn+1were specified.

You specify more key values than primary keys in thepartitionReadfunction. Or, you do not specify key values for all primary keys.

Specify the correct number of key values for the primary keys. To view the key values, use thekeyValuesoutput argument of thecolumninfofunction.

Primary keys of typedatatypemust be a string vector, character vector, or a 1-dimensional cell array of character vectors.

You specify a value that does not contain text data for a key that has atextdata type.

Use a string scalar, character vector, or one-dimensional cell array of character vectors to specify text data.

Primary keys of typedatatypemust be a numeric vector.

你指定一个值,不包含数字data for a key that has a numeric data type.

Use a numeric vector to specify numeric data.

Primary keys of typedatatypemust be either a numeric vector or a 1-dimensional cell array of numeric vectors.

你指定一个值,不包含数字data for a key that has ablobdata type.

Use a numeric vector or one-dimensional cell array of numeric vectors to specify data that has theblobdata type.

Primary keys of typedatatypemust be a logical or numeric vector.

你指定一个值,不包含数字or logical data for a key that has abooleandata type.

Use a numeric or logical vector to specify data that has thebooleandata type.

Primary keys of typedatatypemust be a datetime vector, string vector, character vector, or cell array of character vectors.

你指定一个值,不包含数字or text data for a key that has adateortimestampdata type.

Use adatetimearray, string scalar, character vector, or cell array of character vectors to specify data that has thedateortimestampdata type.

Primary keys of typedatatypemust be a duration vector, string vector, character vector, or cell array of character vectors.

你指定一个值,不包含数字or text data for a key that has atimedata type.

Use adurationarray, string scalar, character vector, or cell array of character vectors to specify data that has thetimedata type.

Primary keys of typedatatypeare not supported by the partitionRead function. To import data fromtablenametable, either use the partitionRead function with no primary key values, or use the executecql function to execute a CQL query.

You specify a data type of a primary key that is not supported in thepartitionReadfunction (for example, user-defined type (UDT) ortuple).

Execute a CQL query using theexecutecqlfunction to filter for the primary keys that thepartitionReadfunction does not support.

UPSERT requires values for the following primary key columns to be specified:columns.

You omit one or more primary keys in the Cassandra database table.

Specify a variable in the MATLAB®卡桑德拉databa表为每个主键se table when you insert or update data using theupsertfunction.

One or more variables in DATA are not a column in the Cassandra table. Use COLUMNINFO to list all columns defined for the table.

One or more variable names in the MATLAB table do not match any column names in the Cassandra database table.

Verify the names of the columns in the Cassandra database table by using thecolumninfofunction. Then, adjust the names of the variables in the MATLAB table accordingly.

See Also

|||||

Related Topics

External Websites