How do I unload/load a UUID using dsbulk?

40 Views Asked by At

I have a UUID in cassandra that I am trying to unload and load into another table using the JSON format.

./bin/dsbulk unload -c json -header false -query 'select * from keyspace.table' -h '"localhost:9042"' > test.json

The first column in the table is a UUID and when I unload using this command, the UUID is rendered as a string. When I load the table, I get this error:

com.datastax.oss.dsbulk.workflow.commons.schema.InvalidMappingException: Could not map field 0 to variable id; conversion from Java type java.lang.String to CQL type UUID failed for raw value: {"id":"f6db139d-893e-4a53-a2a7-bebc3456472c".

How should I be properly unloading and loading a UUID?

0

There are 0 best solutions below