question

xiaochangfeng@gmail.com avatar image
xiaochangfeng@gmail.com asked Erick Ramirez answered

cqlsh COPY TO crashes on MacOS 12 Monterey

Hi, I've followed the instructions on https://docs.datastax.com/en/astra/docs/connecting-to-databases-using-standalone-cqlsh.html to set up a standalone CQLSH so that I can use the COPY TO command to export data from my AstraDB table.

However, when I try to run the command even just to test on a small table it crashes:

e.g.

COPY keyspace.table (partition_key) TO '/Users/joe/Downloads/test.csv';


I get

Child process 3266 died with exit code -9
Child process 3266 died with exit code -9
Child process 3267 died with exit code -9
Child process 3267 died with exit code -9
Child process 3268 died with exit code -9
Child process 3268 died with exit code -9
Child process 3269 died with exit code -9
Child process 3269 died with exit code -9

And

error.png

It looks like some sort of permission error from default MacOS Python ('Namespace Guard')

I'm running macOS 12.1 with Xcode installed.

cqlsh
error.png (108.2 KiB)
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

I haven't been able to replicate the issue (it works for me) but I'm still on MacOS 10 Catalina. I haven't had the chance to upgrade to Monterey yet.

My gut feel is that the problem is with the combination MacOS + Python 2 (see CASSANDRA-16409). Try with Python 3.6 or newer (won't work with earlier versions of Python 3).

Alternatively, our recommendation is to use the DataStax Bulk Loader (DSBulk) for loading and unloading data. It's open-source so it's free to use and works with DSE, Astra DB and open-source Apache Cassandra. For details and examples, see Loading and unloading data from Astra DB. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.