简体   繁体   中英

Cannot set consistency level when querying AWS Managed Cassandra service from DataGrip

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.

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 .

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

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.

在此处输入图像描述

https://dbeaver.com/download

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM