Just trying out Amazon's new Keyspaces (apache cassandra). Followed the directions and created a cqlsh link. Everything looks good until I try to upload data into a table. It kept telling me
Failed to import 1 rows: ParseError - Failed to parse https://xxx.jpg!default : invalid literal for int() with base 10: 'https://xxx.jpg!default', given up without retries
It looks like the url column is considered as other columns. There are two int columns before and after this url column. I tried the exact same data file on my local cassandra. Worked just fine. Upload all the data in 3 mins.
What is the possible reason? How could I solve this?
I figured out the reason. Just post the solution in case someone else encounter the same problem.
You can't use
COPY table FROM 'export.csv' WITH HEADER=true AND INGESTRATE=8000 AND NUMPROCESSES=4 AND MAXBATCHSIZE=20 AND CHUNKSIZE=100
Although I was using the exact same table schema to create the table in Keyspaces, somehow the internal order is still different. To be safe, you can specify the order of columns
COPY table (id,name,xxx,...) FROM 'export.csv' WITH HEADER=true AND INGESTRATE=8000 AND NUMPROCESSES=4 AND MAXBATCHSIZE=20 AND CHUNKSIZE=100