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

sqlite #44

Closed
v217 opened this issue May 8, 2020 · 2 comments
Closed

sqlite #44

v217 opened this issue May 8, 2020 · 2 comments

Comments

@v217
Copy link

v217 commented May 8, 2020

Is there a way to work with sqlite databases.
Wondered if there is a doc/tutorial to get started? Thanks

@wisnesky
Copy link
Contributor

wisnesky commented May 8, 2020

Sure, CQL does not ship with sqlite built-in, so first you'll need to find a sqlite JDBC driver. Then, I'd suggest following the "Importing and exporting SQL data over JDBC" example from https://www.categoricaldata.net/examples , reproduced in part below, but using sqlite in place of mysql.

This example is recommended for anyone dealing with SQL data and is built-in to the IDE as QuickSQL. It imports a cloud-based MySQL database about employees and departments into CQL, demonstrates basic CQL operations, and then exports the data into a CQL's in-memory SQL database, H2. Accessing any external SQL database management system in CQL requires adding the vendor's JDBC driver to the java classpath when running CQL; this example requires downloading MySQL connector-j version 5.1.47 (never version contain errors) and running CQL from the terminal in a directory containing both jar files (on Windows, replace : by ;):

java -cp "cql.jar:mysql-connector-java-5.1.47.jar" catdata.ide.IDE

Example URL: https://www.categoricaldata.net/help/QuickSQL.html

@v217
Copy link
Author

v217 commented May 8, 2020

Thanks! I wasn't sure, if there was a shortcut. I will try my luck with https://bitbucket.org/xerial/sqlite-jdbc.

@v217 v217 closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants