Question-: Which of the following statements are valid for COPY command in the CQL (Cassandra Qury Language).
A. This is a replacement for the DSBulk command. B. When importing data using COPY command, it is fine to have each row different number of columns. C. If the column data type is integer then empty value automatically inserted as zero. D. You should import less than million records using this command.
Answer: D
Explanation: There are multiple ways to importing data in your Cassandra cluster, you should use each one as per the need. CQL COPY command is good for copying less than millions of rows. It is not at all replacement of the tool called “DSBulk� which can be used for copying the entire cluster data and supports billions of rows to be copied.
There is an alternate way for the programmer for using the INSERT command, that is good option when you want to insert less than 1000’s of records in the cluster.
Empty data can be copied but keep in mind these are replace with the NULL values and not with any other values. Similarly, number of columns in the file which you are using for importing the data should have same number of columns in each row.
Question-: Which of the following command you can use to dump the SSTable in JSON format?
A. SSDump B. sstabledump C. sstablejsondump D. Importsstable
Answer: B
Explanation: You can use sstabledump command to dump the data in the JSON format for a particular SSTTable.
Question-: Which of the following command would help in loading the SSTable to Cassandra cluster? A. CQL Copy command B. sstabledump C. DSBulk D. sstableloader
Answer: D
Explanation: There are multiple ways of copying data to the Cassandra cluster. But every tool has a different purposes. In this question it is asked that you need to copy the SSTable, SSTable has data in a specific format which can be understood by the Cassandra storage engine. For that you have a command or tool called sstableloader. This tool can load the existing SSTable data into the existing Cassandra cluster.