Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbSchema Cassandra CQL/CQLSH support and errors #113

Open
brentarias opened this issue Aug 28, 2023 · 1 comment
Open

DbSchema Cassandra CQL/CQLSH support and errors #113

brentarias opened this issue Aug 28, 2023 · 1 comment

Comments

@brentarias
Copy link

I am using DbSchema 9.4.1 build 230818.

Apparently DbSchema supports CQL...but not keywords that are unique to CQLSH. That isn't necessarily a problem, except that DbSchema should improve the error message(s) it gives when encountering CQLSH syntax.

For example, I connected to Cassandra DB and I executed the following command:

DESCRIBE TABLE idt.experiment;
//or...
DESC idt.experiment;

Both of the above commands give the same error:

no viable alternative at input '0' (...* FROM idt.experiment WHERE [0]...)

I am new to both Cassandra and DbSchema...so it was a considerable drain on my time to discover the real cause of this error.

For context, I used DbSchema to create a table called idt.experiment using this syntax:

CREATE TABLE idt.experiment (
    part_k int,
    ck int,
    d map<int,text> static,
    PRIMARY KEY (part_k, ck)
);

The above worked successfully in creating the table.

The only way I am successfully able to get a "description" of the table I made, is to switch to the following syntax:

select * from system_schema.columns where keyspace_name='idt' AND table_name='experiment';

The above works, and gives me the following output:

image

I'd love for DbSchema to add support for the CQLSH syntax...but in the absence of that support...please provide a more helpful error message. :)

Incidentally, my copy of DbSchema "About" page says:

Pro Trial: 9 days left

However, I downloaded the community edition...so I don't know why it claims I am using a trial.

@dbschema-pro
Copy link
Owner

We will implement the describe in the driver.
The Pro edition (features related to the model file) is enabled automatically for 2 weeks, then it turns to Community Edition.
I think you are right, we should ask the user if he wants to enable the Pro Trial first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants