PRIMARY KEY((customer_id,source_id),status_code,create_timestamp,modified_timestamp)
The following is how I inserted it
insert into testkeyspace.customers
(customer_id, source_id, status_code,
create_timestamp, modified_timestamp)
value ('123e4567-e89b-12d3-a456-426655440000 ',
1122334455, 0, toTimestamp(now()), toTimestamp(now()));
Look at this answer to a similar question
I tried to insert two records with all the same values in the primary key in the Cassandra table, and Insertion is successful. I am new to Cassandra and think that Primary Keys in Cassandra are not allowed to be inserted repeatedly. Is this incorrect? The following are the columns in my primary key
PRIMARY KEY((customer_id,source_id),status_code,create_timestamp,modified_timestamp)
The following is how I inserted it
insert into testkeyspace.customers
(customer_id, source_id, status_code,
create_timestamp, modified_timestamp)
value ('123e4567-e89b-12d3-a456-426655440000 ',
1122334455, 0, toTimestamp(now()), toTimestamp(now()));
You are checking the 2 in the primary key Clustering columns use toTimestamp(now()), so 2 inserted records are unlikely to have exactly the same value for these columns, that is, the two records are not repeated.
Look at this answer to a similar question