TursoDB
Connecting Your Turso DB (SQLite) Database to Sequel
Welcome to Sequel! This guide will help you connect your Turso DB (SQLite) database to Sequel, enabling you to run SQL queries using natural language and visualize results with charts and graphs.
Prerequisites
Before you begin, ensure you have the following:
- Turso DB (SQLite) Database: Make sure your Turso database is set up and running.
- Connection Details: You will need the following details:
- Host URL (e.g.,
libsql://your-database-name.turso.io
) - Auth Token (Generated from the Turso dashboard)
- Host URL (e.g.,
- Sequel Account: You must have a Sequel account. If you haven’t signed up yet, you can create an account at Sequel.
Step 1: Get Your Connection Details from Turso
To connect your Turso DB database to Sequel, you’ll first need to retrieve your connection details from the Turso dashboard:
- Log in to your Turso account and navigate to the database you want to connect.
- Copy the Host URL for your database, which should look like
libsql://your-database-name.turso.io
. - Generate an Auth Token:
- Click on your database, and select the option to Create Token.
- Set the permissions (e.g., Read/Write) and expiration duration.
- Copy the generated Auth Token.
For more information, see the Turso documentation on auth tokens.
Step 2: Navigate to Database Connections in Sequel
- On the Sequel dashboard, locate the menu on the left-hand side.
- Click on Database Connections to open the database management page.
Step 3: Add a New Connection
- In the Databases section, click the New Connection button.
- From the list of available database types, select Turso DB (SQLite).
Step 4: Enter Connection Details
You will now need to enter the required information to connect your Turso DB database:
- Display Name: Give your connection a meaningful name (e.g., "Turso Production DB" or "Turso Analytics DB").
- Host URL: Paste the Host URL you copied from the Turso dashboard (e.g.,
libsql://your-database-name.turso.io
). - Auth Token: Enter the Auth Token you generated for your database.
Step 5: Test and Save the Connection
Click on the Test and Save Connection button to verify your connection details. Once the test is successful, Sequel will open the explorer view for your connected database. You can now begin asking your database questions or executing SQL queries.
Step 6: Query Your Database
Now that your Turso DB is connected, you can start querying it using natural language:
- Return to the Sequel dashboard.
- In the query input box, type a question or request, such as “Show me the list of customers added in the last week” or “What is the total revenue for last month?”.
- Sequel will convert your request into an SQL query, execute it against your Turso DB, and display the results.
Step 7: Visualize Data with Charts and Graphs
Sequel also allows you to create visualizations simply by asking it to visualize the data as a bar chart, line chart, or pie chart.
For example:
- Show me the total sales in the last 30 days as a line chart.
- Show me a bar graph of the top 5 products sold.
- Show me a pie chart of user distribution by country.
Troubleshooting
If you encounter any issues during the connection process:
- Connection Errors: Ensure your Host URL and Auth Token are correctly entered. Double-check that the token hasn’t expired.
- Database Access: Ensure your database permissions allow access to Sequel, and that the Auth Token provides the necessary read/write access.
- Firewall/Network Issues: Ensure your database server allows connections from Sequel or from your local network if applicable.
Conclusion
You’ve successfully connected your Turso DB (SQLite) database to Sequel! Now, you can take advantage of Sequel’s natural language processing to query your database and generate insightful visualizations.
If you need further assistance, feel free to contact our support team or refer to the Sequel documentation.
Happy querying!
Additional Resources
On this page
- Connecting Your Turso DB (SQLite) Database to Sequel
- Prerequisites
- Step 1: Get Your Connection Details from Turso
- Step 2: Navigate to Database Connections in Sequel
- Step 3: Add a New Connection
- Step 4: Enter Connection Details
- Step 5: Test and Save the Connection
- Step 6: Query Your Database
- Step 7: Visualize Data with Charts and Graphs
- Troubleshooting
- Conclusion
- Additional Resources