Cassandra database import issue for timeuuid

674 Views Asked by At

I have installed Cassandra 2.2.12 on my window machine locally. I have exported database from live server in a '.sql' file using 'razorsql' GUI tool. I don't have server access for live, only have database access. When i am trying ti import '.sql' file using 'razorsql' to local cassandra setup, its giving me error (Invalid STRING constant '8ca25030-89ab-11e7-addb-70a0656e5127' for "id" of type timeuuid). Even i tried using COPY FROM command, its returning same error. Please find attached screen-shot for more detail of error. enter image description here

Could anybody please help?

2

There are 2 best solutions below

4
Andrea Nagy On

You should not put any quotes, because then it gets interpreted as a string instead of UUID - hence the error message.

See also: Inserting a hard-coded UUID via CQLsh (Cassandra)

0
Horia On

I think you have two solutions:

  1. edit your export file and remove the single quotes from the inserts.
  2. rerun the export and export the data as csv and run the copy command in cqlsh. In this case, the csv file will not have quotes.