HTAP Summit 2024 session replays are now live!Access Session Replays

Why Chat2Query

Unlike other AI SQL generators in the market, Chat2Query not only helps users generate SQL queries without extensive SQL knowledge, it also handles complex queries and offers real-time insights into dynamic datasets. This is possible thanks to:

 


OpenAI’s GPT3

The industry-leading natural language-to-code processing model.


TiDB Cloud Serverless Tier

The Hybrid Transactional and Analytical Processing (HTAP) database service. It enables developers to deploy their infrastructure at scale in the most cost-efficient way without managing server infrastructure.

 

Explore sample use cases

Query on S&P 500 Dataset – tell me the top 10 companies with highest revenue growth

S&P 500 dataset

Minimize your efforts to gain data insights

Try Chat2Query Now

Get started with Chat2Query

Step 1: Sign in to TiDB Cloud Serverless Tier.

Sign up for a TiDB Cloud account using your email, Google account, or GitHub account. Your Serverless Tier cluster will be created automatically in less than 20 seconds, and you will be directed to the Chat2Query interface.

Step 2: Prepare your datasets

 

You can query against the sample datasets. Click ? Button on the right-bottom corner, select Interactive Tutorials, and select the sample dataset to import.

Step 3: Explore insights with Chat2Query

  1. Generate the query. In the SQL Editor, activate Chat2Query by pressing ‘Ctrl’ + ‘I’. Type your question and press Enter to let AI generates the query in SQL.
  2. Review the query. Click Accept to accept the SQL query or click Regenerate to get another candidate.
  3. Run your query. In the top right-hand corner of the screen, click the Run button. The query results are displayed at the bottom of the page.
  1. For starters, get your target datasets ready. If you don’t have any, you can get one from free dataset hosting websites such as Kaggle.
  2. Under the Schemas tab, click ... to the right of the target database, and click Import Data to start importing your dataset. You can either import from a local CSV file or Amazon S3.
  3. Follow the prompts to configure the import source and target and start importing. The time it takes varies depending on the size of the data. When the import is done, the import detail window is displayed.

Demo-Import Data

Step 3: Explore insights with Chat2Query

  1. Generate the query. In the SQL Editor, activate Chat2Query by pressing ‘Ctrl’ + ‘I’. Type your question and press Enter to let AI generates the query in SQL.
  2. Review the query. Click Accept to accept the SQL query or click Regenerate to get another candidate.
  3. Run your query. In the top right-hand corner of the screen, click the Run button. The query results are displayed at the bottom of the page.

Built with security and privacy

The privacy and security of user data is our top priority. We understand that our users trust us to protect their information and we take that responsibility seriously. As a query service on TiDB Cloud, Chat2Query only needs to access your database schema to generate SQL, and not your actual data.

Limitations

As a beta project, Chat2Query is still in development with a lot of room for improvement. Therefore, there are two limitations to keep in mind:

  1. The generated SQL is not always 100% correct and may still need further tweaking.
  2. Chat2Query has limited support for SQL statements. DDL statements such as CREATE TABLE and DROP TABLE are not supported yet.

Get early access now

You can obtain early access here. We’d love to hear your feedback so we can make this query tool even better.

In the meantime, Chat2Query is in rapid development. Please follow us on Twitter to stay up-to-date on its progress or post any feedback with hashtag #Chat2Query.

Start AI-powered data exploration with Chat2Query

Start Now