Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

pranali.khanna101994_189965 avatar image
pranali.khanna101994_189965 asked ·

Why does COPY FROM on Astra database return "Provided value ONE is not allowed for Write Consistency Level"?

By default in CASSANDRA , consistency level is one for all R/W operations. But when I am trying to import data into table via CSV I get this error :

Failed to import 7 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="Provided value ONE is not allowed for Write Consistency Level (disallowed values are: [ANY, ONE, LOCAL_ONE])"

why this level is not allowed ?

because when i set consistency as QUOROUM it worked for me. but why not with default consistency?

astraconsistency
1 comment
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@pranali.khanna101994_189965 Can you please provide more information - what version of Cassandra are you running and how are you getting this error?

Please refer to the steps where it works.

0 Likes 0 · ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@pranali.khanna101994_189965 DataStax Astra databases include guardrails that enforce best practices so new and experienced developers are off to a good start when using Apache Cassandra.

One of those best practices is to use a strong consistency level when writing data. The recommendation is to use LOCAL_QUORUM or QUORUM to mitigate against data loss in the event of a replica being unavailable.

For more information, see the DataStax Astra documentation. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image Erick Ramirez ♦♦ pranali.khanna101994_189965 ·

No probs. Cheers!

0 Likes 0 · ·