According to COPY TO — CrateDB: Reference
The COPY TO command exports the contents of a table to one or more files into a given directory with unique filenames. Each node with at least one shard of the table will export its contents onto their local disk.
The created files are JSON formatted and contain one table row per line and, due to the distributed nature of CrateDB, will remain on the same nodes where the shards are.
Here’s an example:
cr> COPY quotes TO DIRECTORY ‘/tmp/’ with (compression=‘gzip’);
COPY OK, 3 rows affected …
I’m a bit confused about: “will remain on the same nodes where the shards are“. Can you clarify with a few examples? If I export one big table with many shards, will I find more than one JSON file residing on different nodes?