I have DevCenter 1.2.1.Some CQL commands working well but COPY command is not working.It shows error message "You made a type...sorry typo".Any hint???
The copy command, as well as some other commands are unique to cqlsh only and not part of the CQL spec proper, so they cannot be used in DevCenter.
Source: https://groups.google.com/a/lists.datastax.com/forum/#!topic/java-driver-user/JQXF99YAB_E (what applies to drivers also applies to DevCenter)
While DevCenter does not support cqlsh specific commands such as COPY, it does allow you to copy results of a query from the Results view in either a CSV or INSERT statement format.
For CSV, execute your query and select the rows you want to copy in the Results view, then right-click and select "COPY as CSV". You can also select "COPY All as CSV" as a shortcut if you want all rows from the result set. This will copy all the result data to the clipboard and the format of this data should be compatible with cqlsh COPY. You can paste this data into a file to get a result similar to COPY TO in cqlsh.
You cannot directly achieve the same thing as cqlsh COPY FROM in DevCenter, however the "Copy [All] as INSERT" option provides the ability to generate INSERT statements from a given query result set to the clipboard which can then be pasted back into the editor and executed again. For small data sets, this method can be a convenient to create a script to load data for testing or backup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With