3

I'm trying to perform inserts on Amazon's Managed Cassandra service from IntelliJ's DataGrip IDE, however I recieve the following error:

Consistency level LOCAL_ONE is not supported for this operation. Supported consistency levels are: LOCAL_QUORUM

This is due to Amazon using the LOCAL_QUORUM consistency level for writes.

I tried to set the consistency level with CONSISTENCY LOCAL_QUORUM; before running other queries but it returned the following error:

line 1:0 no viable alternative at input 'CONSISTENCY' ([CONSISTENCY])

From my understanding, this is because CONSISTENCY is a cqlsh command and not a CQL command.

I cannot find any way to set the consistency level from within DataGrip so that I can run scripts and populate my tables.

Ultimately, I will use plain cqlsh if I cannot find a solution but I was hoping to use DataGrip as I find it useful and have many databases already configured. I hope someone can shed some light on the issue, this seems like it should be a basic feature.

Autumn88
  • 351
  • 1
  • 11
Jack
  • 886
  • 7
  • 27

3 Answers3

4

I am Max from DataGrip team, and the correct answer is:

It could be JDBC driver issue and the desired method hasn't been implemented yet. Since you're trying to run pure cqlsh command as SQL. Follow the issue DBE-10638.

moscas
  • 9,064
  • 36
  • 42
2

It's a DataGrip bug, see https://youtrack.jetbrains.com/issue/DBE-10182 :

Cassandra 'CONSISTENCY' command is not supported

So upvote that bug, and maybe add a comment that it makes DataGrip useless for writing to Amazon Managed Cassandra

Serban Teodorescu
  • 1,350
  • 8
  • 5
  • I've seen this before, though I was hoping it would've been included in the latest release as the issue seems to be fixed. I will wait to see if any alternatives come up in the meantime. – Jack Apr 21 '20 at 10:57
  • Syntax highlighting in this situation is not applicable since it's cqlsh command. – Vasilii Chernov Apr 25 '20 at 19:03
1

Amazon Keyspaces (Apache Cassandra)

Now I used DataGrip version 2020.1.3 (Buy Licensed)

Encounter problems as well.

Cannot change type CONSISTENCY ONE to LOCAL_QUORUM

I have opened an issue already and waiting for the investigation.

So, I try so many tools and found that DBeaver is working,

The CONSISTENCY can be selected in the configuration GUI.

enter image description here

https://dbeaver.com/download

bamossza
  • 3,676
  • 1
  • 29
  • 28