patternMinor
Cassandra DB: store binary file record via shell
Viewed 0 times
filestoreshellrecordbinaryviacassandra
Problem
While the dev team works on a REST service to manage binary data in Cassandra, ops would like to store local blobs directly from shell.
Is it actually possible via CQL/bash without a Cassandra driver? I could find so far only an example for Ruby.
Is it actually possible via CQL/bash without a Cassandra driver? I could find so far only an example for Ruby.
Solution
The only way to do it with cqlsh is wrap binary file into CSV file and run
IMO: Since cqlsh is a wrapper around python client, your ops should just write simple python script for this operation, it would be much easier in many ways.
cqlsh --some_args -e 'COPY table_name FROM binary_wrapped.csv', but in order to do so you have to generate a new primary key to use in CSV-file.IMO: Since cqlsh is a wrapper around python client, your ops should just write simple python script for this operation, it would be much easier in many ways.
Context
StackExchange DevOps Q#2076, answer score: 5
Revisions (0)
No revisions yet.